本文整理汇总了C#中PIC.VDS2G.ACM.CAA.CAACommon.ToMakeUp_SetFocus_Script方法的典型用法代码示例。如果您正苦于以下问题:C# CAACommon.ToMakeUp_SetFocus_Script方法的具体用法?C# CAACommon.ToMakeUp_SetFocus_Script怎么用?C# CAACommon.ToMakeUp_SetFocus_Script使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PIC.VDS2G.ACM.CAA.CAACommon
的用法示例。
在下文中一共展示了CAACommon.ToMakeUp_SetFocus_Script方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
//.........这里部分代码省略.........
#endregion
if (!IsPostBack)
{
#region 寫入首次載入Page TimeStamp
PageTimeStamp.Value = string.Format("{0}{1}{2}{3}{4}{5}",
DateTime.Now.Year.ToString(),
DateTime.Now.Month.ToString().PadLeft(2, '0'),
DateTime.Now.Day.ToString().PadLeft(2, '0'),
DateTime.Now.Hour.ToString().PadLeft(2, '0'),
DateTime.Now.Minute.ToString().PadLeft(2, '0'),
DateTime.Now.Second.ToString().PadLeft(2, '0')
);
#endregion
#region 設定ToolBar預設狀態
ToolBarInit();
#endregion
#region 設定GridView預設樣式
Initialization_Component();
#endregion
#region 設定Button區的狀態
this.panel_Format1.Visible = true;
this.panel_Format2.Visible = false;
#endregion
#region 設定頁面預設狀態
this.radl_PROOF_TYPE.SelectedIndex = 0;//憑證已回
this.radl_REPROOF_TYPE.SelectedIndex = 0;//取具進項憑証
this.radl_RECEIPT_TYPE.SelectedIndex = 0;//取具收據
this.radl_CANCEL_TYPE.SelectedIndex = 0;//作廢
this.radl_PERIOD_TYPE.SelectedIndex = 0;//申報
this.radl_TEMPORAL_TYPE.SelectedIndex = 0;//轉暫收
this.radl_3_Report_Type.SelectedIndex = 0;//頁籤=報表 欄位[報表類型]
//20110505 rika 新增跳頁過來時指定頁籤功能
if ((Request.QueryString["tab_inv"] == null) ? false : true)
{
this.TabContainer1.ActiveTabIndex = 1;
}
#region 設定ValidationGroup
this.but_Query.ValidationGroup = "TAB1";
this.but_Out.ValidationGroup = "TAB1";
this.but_TAB3_Print.ValidationGroup = string.Empty;
this.but_TAB3_Out.ValidationGroup = string.Empty;
#endregion
JS_Process();
#endregion
#region 預設系統功能鍵
this.Form.Attributes["onkeypress"] += "return CAACommon_WebForm_FireDefaultButton(event,'" + this.but_Query.ClientID + "');";
#endregion
}
else
{
if (Request.Form["__EVENTARGUMENT"] == "but_TAB3_Print_Total")
{ but_TAB3_Print_Total(); }
}
}
catch (Exception ex)
{
WaringLogProcess(ex.Message);
this.ErrorMsgLabel.Text = ex.Message;
}
finally
{
Finally_Function();
#region Focus欄位
if (!IsPostBack)
{
BCO.CAACommon CAAComm = new BCO.CAACommon();
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(this.but_Query.ClientID, false);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA181", s_ScriptManager_Script, true);
}
#endregion
}
}
示例2: but_Out_Click
/// <summary>
/// BUTTON [檔案下載]鈕
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void but_Out_Click(object sender, EventArgs e)
{
try
{
#region 將 CheckBox 選擇的資訊寫入TempTable
bool b_IsRightExecute;
bool b_IsAllCheck;
Set_PageValue_To_TempTable(out b_IsRightExecute, out b_IsAllCheck);
if (b_IsRightExecute == false)
{ throw new Exception("CheckBox 的資訊寫入TempTable 時發生錯誤"); }
#endregion
#region 檢查條件
BCO_CAA.CAACommon CAAComm = new BCO_CAA.CAACommon();
ArrayList arl_Check_Condition = Check_Condition("BUTTON [檔案下載]鈕");
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CGD261", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#endregion
#region 整理匯出資料
#region 宣告變數
System.Text.StringBuilder sb_Out_String = new System.Text.StringBuilder();
string s_LINE = string.Empty;//設定現在是哪一線的商品
string s_BARCODE = string.Empty;//商品條碼
string s_Filter_Expression = string.Empty;
#endregion
#region 設定欄位[商品條碼]
//欄位[商品條碼],是使用者在畫面上輸入的資料,
//因為贈品對應不到[商品條碼]資料,所以統一抓商品的[商品條碼]。
//s_Filter_Expression = "ROW_TYPE = 'ITEM'";
//DataRow[] dr_BARCODE = dt_Result.Select(s_Filter_Expression);
//if (dr_BARCODE.Length == 1)
//{ s_BARCODE = dr_BARCODE[0]["BARCODE"].ToString() + "-" + dr_BARCODE[0]["PERIOD_BARCODE"].ToString(); }
//else
//{ throw new Exception("該筆資料查無商品的資料。"); }
#endregion
foreach (DataRow dr in dt_Result.Rows)
{
if (dr["CHECK_FLG"].ToString() == "1")//勾選(0=未勾選,1=已勾選,預設為已勾選),有勾選才寫
{
for (int i = 0; i < 3; i++)
{
#region 每一筆資料依照順序跑XYZ理貨線
switch (i)
{
case 0:
s_LINE = "X";
break;
case 1:
s_LINE = "Y";
break;
case 2:
s_LINE = "Z";
break;
}
#endregion
//.........这里部分代码省略.........
示例3: btn_Update_Click
/// <summary>
/// 編輯模式下按下[儲存]鈕
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btn_Update_Click(object sender, EventArgs e)
{
try
{
#region 檢查條件
BCO.CAACommon CAAComm = new BCO.CAACommon();
ArrayList arl_Check_Condition = Check_Condition("Edit");
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.UpdatePanel1, typeof(UpdatePanel), "CAA162", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#endregion
#region 傳入參數
string strMsg = string.Empty;
string strNowDate = DateTime.Now.ToString();
string strNo = dt.Rows[0]["BOND_NO"].ToString();
string str_UN_MONTH_CLOSE = "0";
if (this.cb_UN_MONTH_CLOSE.Checked == true)
{ str_UN_MONTH_CLOSE = "1"; }
string str_EX_DUE_FLG = "0";
if (this.cb_EX_DUE_FLG.Checked == true)
{ str_EX_DUE_FLG = "1"; }
ParameterList.Clear();
//舊資料
ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["BOND_NO"].ToString(), "string", false)); //V_OLD_BOND_NO
ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEDATE"].ToString(), "datetime", false)); //D_OLD_CREATEDATE
ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEUID"].ToString(), "string", false)); //V_OLD_CREATEUID
ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEDATE"].ToString(), "datetime", false)); //D_OLD_UPDATEDATE
ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEUID"].ToString(), "string", false)); //V_OLD_UPDATEUID
//新資料
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_BOND_NO.Text, "string", false)); //V_NEW_BOND_NO
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID.Text, "string", false)); //V_NEW_STORE_ID
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_BOND_ID.Text.ToUpper(), "string", false)); //V_NEW_BOND_ID
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_BOND_TYPE.Text, "string", false)); //V_NEW_BOND_TYPE
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_ACCEPT_BOND_DATE.Text, "date", false)); //D_NEW_ACCEPT_BOND_DATE
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DUE_DATE.Text, "date", false)); //D_NEW_DUE_DATE
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_BOND_AMT.Text, "int", false)); //N_NEW_BOND_AMT
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_POSTAGE.Text, "int", false)); //N_NEW_POSTAGE
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_PAY_BANK.Text, "string", false)); //V_NEW_PAY_BANK
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_PAY_ACCOUNT.Text, "string", false)); //V_NEW_PAY_ACCOUNT
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_COLL_BANK.Text, "string", false)); //V_NEW_COLL_BANK
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_COLL_ID.Text, "string", false)); //V_NEW_COLL_ID
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_NB_COLL_DATE.Text, "date", false)); //D_NEW_NB_COLL_DATE
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_MEMO.Text, "string", false)); //V_NEW_MEMO
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_REJECT_DATE.Text, "date", false)); //D_NEW_REJECT_DATE
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_REJECT_MEMO.Text, "string", false)); //V_NEW_REJECT_MEMO
ParameterList.Add(CAAComm.GetValueSetParameter(str_UN_MONTH_CLOSE, "string", false)); //V_NEW_UN_MONTH_CLOSE
ParameterList.Add(CAAComm.GetValueSetParameter(str_EX_DUE_FLG, "string", false)); //V_NEW_EX_DUE_FLG
ParameterList.Add(CAAComm.GetValueSetParameter(strNowDate, "datetime", false)); //D_NEW_UPDATEDATE
ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false)); //V_NEW_UPDATEUID
#endregion
#region 組合跳轉頁面字串
string s_ADDLocation_Replace_String = string.Empty;
try
{
int i_Count = int.Parse(Request.QueryString["CAA162_COUNT"]);
string s_Request_Key = Request.QueryString["CAA162_PageTimeStamp"];
s_ADDLocation_Replace_String = "&CAA162_COUNT=" + i_Count.ToString() + "&CAA162_PageTimeStamp=" + s_Request_Key;
}
catch { s_ADDLocation_Replace_String = string.Empty; }
#endregion
//.........这里部分代码省略.........
示例4: chb_CANCEL_FLG_CheckedChanged
/// <summary>
/// 欄位[作廢]CheckedChanged事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void chb_CANCEL_FLG_CheckedChanged(object sender, EventArgs e)
{
try
{
#region 檢視狀態
if (this.hid_PageStatus.Value == "edit")
{
#region 欄位[作廢]被勾選
if (this.chb_CANCEL_FLG.Checked == true)
{
#region 帶出作廢日期
this.slp_CANCEL_DATE.Text = DateTime.Now.ToString("yyyy/MM/dd");
#endregion
#region 隱藏下方發票明細(存在於TempTable中的明細資料不做異動)
Set_Disc_NewItem_Default();
this.panel_gv_DiscInv.Visible = false;
this.but_Disc_NewItem.Enabled = false;
this.panel_Disc_NewItem.Visible = false;
#endregion
}
#endregion
#region 欄位[作廢]被取消勾選
else
{
#region 清空作廢日期
this.slp_CANCEL_DATE.Text = string.Empty;
#endregion
#region 打開下方發票明細
//如果欄位[取具進項憑証]和[取具收據]都沒有勾選才打開
if (this.chb_REPROOF_FLG.Checked == false &&
this.chb_RECEIPT_FLG.Checked == false)
{
this.panel_gv_DiscInv.Visible = true;
this.but_Disc_NewItem.Enabled = true;
}
#endregion
}
#endregion
}
#endregion
}
catch (Exception ex)
{
WaringLogProcess(ex.Message);
this.ErrorMsgLabel.Text = ex.Message;
}
finally
{
Finally_Function();
#region Focus欄位
BCO.CAACommon CAAComm = new BCO.CAACommon();
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(this.chb_CANCEL_FLG.ClientID, false);
ScriptManager.RegisterStartupScript(this.up_Condition, typeof(UpdatePanel), "CAA182", s_ScriptManager_Script, true);
#endregion
}
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
#region 清空Message
this.ErrorMsgLabel.Text = string.Empty;
#endregion
if (!IsPostBack)
{
#region 寫入首次載入Page TimeStamp
PageTimeStamp.Value = string.Format("{0}{1}{2}{3}{4}{5}",
DateTime.Now.Year.ToString(),
DateTime.Now.Month.ToString().PadLeft(2, '0'),
DateTime.Now.Day.ToString().PadLeft(2, '0'),
DateTime.Now.Hour.ToString().PadLeft(2, '0'),
DateTime.Now.Minute.ToString().PadLeft(2, '0'),
DateTime.Now.Second.ToString().PadLeft(2, '0')
);
#endregion
#region 設定ToolBar預設狀態
ToolBarInit();
#endregion
#region 設定預設功能鍵
this.Form.DefaultButton = this.but_Query.UniqueID;
#endregion
#region 設定畫面的預設值
this.slp_ST_ACCEPT_DATE.Text = DateTime.Now.AddDays(1).ToString("yyyy/MM/dd");//[門市進貨日]
this.txt_PICK_BATCH.Text = "2";//[理貨批次]
this.ddl_LINE_B.SelectedValue = "X";//[理貨線]起
this.ddl_LINE_E.SelectedValue = "Z";//[理貨線]迄
#endregion
#region 設定畫面控制項的[字型][寬度]大小
//頁籤
this.slp_ST_ACCEPT_DATE.DateTextBox.Font.Size = FontUnit.Medium;//[門市進貨日]字型大小
((RequiredFieldValidator)this.slp_ST_ACCEPT_DATE.FindControl("RequiredFieldValidator1")).Font.Size = FontUnit.Medium;//[門市進貨日]驗證控制項字型大小
((CustomValidator)this.slp_ST_ACCEPT_DATE.FindControl("CustomValidator1")).Font.Size = FontUnit.Medium;//[門市進貨日]驗證控制項字型大小
this.slp_ST_ACCEPT_DATE.DateTextBox.Width = Unit.Pixel(110);//[門市進貨日]欄位寬度
this.txt_PICK_BATCH.Font.Size = FontUnit.Medium;//[理貨批次]字型大小
this.req_PICK_BATCH.Font.Size = FontUnit.Medium;//[理貨批次]驗證控制項字型大小
this.ddl_LINE_B.Font.Size = FontUnit.Medium;//[理貨線]起字型大小
this.ddl_LINE_E.Font.Size = FontUnit.Medium;//[理貨線]迄字型大小
this.txt_FULL_BARCODE.Font.Size = FontUnit.Medium;//[商品條碼]字型大小
this.req_FULL_BARCODE.Font.Size = FontUnit.Medium;//[商品條碼]驗證控制項字型大小
this.txt_FULL_BARCODE.Width = Unit.Pixel(350);//[商品條碼]欄位寬度
this.txt_BARCODE.Font.Size = FontUnit.Medium;//[條碼]字型大小
this.txt_PERIOD_BARCODE.Font.Size = FontUnit.Medium;//[二段條碼]字型大小
this.txt_ITEM_NAME.Font.Size = FontUnit.Medium;//[品名]字型大小
this.txt_ITEM.Font.Size = FontUnit.Medium;//[品號]字型大小
this.txt_PERIOD.Font.Size = FontUnit.Medium;//[期別]字型大小
#endregion
}
}
catch (Exception ex)
{
WaringLogProcess(ex.Message);
this.ErrorMsgLabel.Text = ex.Message;
}
finally
{
#region Focus欄位
if (!IsPostBack)
{
BCO_CAA.CAACommon CAAComm = new BCO_CAA.CAACommon();
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(this.txt_FULL_BARCODE.ClientID, false);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CGD261", s_ScriptManager_Script, true);
}
#endregion
}
}
示例6: but_Disc_Insert_Click
/// <summary>
/// 折讓項目 BUTTON [確認]鈕
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void but_Disc_Insert_Click(object sender, EventArgs e)
{
try
{
bool b_ExistTempTable = false;
#region 新增狀態 & 編輯狀態
if (this.hid_PageStatus.Value == "insert" ||
this.hid_PageStatus.Value == "edit")
{
#region 檢查條件
BCO.CAACommon CAAComm = new BCO.CAACommon();
ArrayList arl_Check_Condition = Check_Condition("折讓項目 BUTTON [確認]鈕");
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel2.Text = arl_Check_Condition[1].ToString();
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA182", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#endregion
#region SLP轉型
TextBox txt_Disc_DISC_TAX = (TextBox)this.slp_Disc_DISC_TAX.FindControl("TextBoxCode");
#endregion
#region 判斷資料是否存在於dt_NewItem
int i_DISC_UAMT = int.Parse(this.slp_Disc_DISC_UAMT.Text);//折讓金額(未稅)
int i_DISC_TAX = int.Parse(Request[txt_Disc_DISC_TAX.UniqueID].ToString());//折讓稅額
int i_Total_NON_INV_UAMT = int.Parse(this.hid_Disc_Total_NON_INV_UAMT.Value);//發票餘額(未稅)+折讓金額(未稅)
int i_Total_NON_INV_TAX = int.Parse(this.hid_Disc_Total_NON_INV_TAX.Value);//發票稅額+折讓稅額
bool b_Is_NeedChange = false;
string s_FilterExpression = "INV_NO = '" + this.txt_Disc_INV_NO.Text + "'";
DataRow[] dr_Edit = dt_NewItem.Select(s_FilterExpression);
#region 存在,則更改dt_NewItem的資料
if (dr_Edit.Length == 1)
{
if (dr_Edit[0].RowState == DataRowState.Added)
{ b_Is_NeedChange = true; }
else
{
//如果新增項目中的[折讓金額(未稅)][折讓稅額]沒有異動,則不做動作
if (
(dr_Edit[0]["DISC_UAMT", DataRowVersion.Original].ToString() != i_DISC_UAMT.ToString() || dr_Edit[0]["DISC_TAX", DataRowVersion.Original].ToString() != i_DISC_TAX.ToString()) ||
(dr_Edit[0]["DISC_UAMT", DataRowVersion.Current].ToString() != i_DISC_UAMT.ToString() || dr_Edit[0]["DISC_TAX", DataRowVersion.Current].ToString() != i_DISC_TAX.ToString())
)
{ b_Is_NeedChange = true; }
}
if (b_Is_NeedChange == true)
{
dr_Edit[0]["INV_NO"] = CAAComm.GetValueSetParameter(this.txt_Disc_INV_NO.Text, "string", false);//發票號碼
dr_Edit[0]["INV_DATE"] = CAAComm.GetValueSetParameter(this.slp_Disc_INV_DATE.Text, "date", false);//發票日期
dr_Edit[0]["ITEM_NAME"] = CAAComm.GetValueSetParameter(this.txt_Disc_ITEM_NAME.Text, "string", false);//品名
dr_Edit[0]["TAX_TYPE"] = CAAComm.GetValueSetParameter(this.slp_Disc_TAX_TYPE.Text, "int", false);//發票稅別
dr_Edit[0]["TAX_TYPE_NAME"] = (this.slp_Disc_TAX_TYPE.Text == "0") ? "應稅" : (this.slp_Disc_TAX_TYPE.Text == "1") ? "免稅" : "零稅";
dr_Edit[0]["DISC_UAMT"] = CAAComm.GetValueSetParameter(i_DISC_UAMT.ToString(), "int", false);//折讓金額(未稅)
dr_Edit[0]["DISC_TAX"] = CAAComm.GetValueSetParameter(i_DISC_TAX.ToString(), "int", false);//折讓稅額
dr_Edit[0]["DISC_AMT"] = Convert.ToString(i_DISC_UAMT + i_DISC_TAX);//含稅金額
dr_Edit[0]["NON_INV_UAMT"] = CAAComm.GetValueSetParameter(Convert.ToString(i_Total_NON_INV_UAMT - i_DISC_UAMT), "int", false);//發票餘額(未稅)
dr_Edit[0]["NON_INV_TAX"] = CAAComm.GetValueSetParameter(Convert.ToString(i_Total_NON_INV_TAX - i_DISC_TAX), "int", false);//發票稅額
}
b_ExistTempTable = true;
}
#endregion
//.........这里部分代码省略.........
示例7: txt_STORE_ID_Onblur
/// <summary>
/// 離開[店號]時,帶出相關資料
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txt_STORE_ID_Onblur()
{
try
{
#region 新增模式
BCO.CAACommon CAAComm = new BCO.CAACommon();
if (this.hid_PageStatus.Value == "insert")
{
#region 檢查傳入欄位[店號]的值
if (this.slp_STORE_ID.Text.Trim() == string.Empty)
{
Set_STORE_ID_Default();
#region Focus欄位
DropDownList drop_DISC_TYPE = (DropDownList)this.slp_DISC_TYPE.FindControl("D1");
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(drop_DISC_TYPE.ClientID, false);
ScriptManager.RegisterStartupScript(this.up_Condition, typeof(UpdatePanel), "CAA182", s_ScriptManager_Script, true);
#endregion
return;
}
#endregion
#region 傳入參數
//新增狀態下,必須使用sysdate,去查店號資料
//資料必須是當時有效的店號
ParameterList.Clear();
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID.Text, "string", false));//[店號]
ParameterList.Add(CAAComm.GetValueSetParameter(DateTime.Now.ToString(), "datetime", false));//時間
ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false));//V_LOG_UPDATEUID
#endregion
#region 連結資料庫
BCO.MaintainDiscRecord bco = new BCO.MaintainDiscRecord(ConntionDB);
IDataReader dr = bco.QUERY_CAA18_DATA_BY_STORE_ID(ParameterList);
#endregion
#region 將資料寫入相關欄位
//重新將店號再寫入一次
this.slp_STORE_ID.Text = this.slp_STORE_ID.Text;
if (dr.Read())
{
this.slp_GROUP_NO.Text = dr.IsDBNull(0) ? string.Empty : dr.GetString(0);//店群
this.slp_Z_O.Text = dr.IsDBNull(1) ? string.Empty : dr.GetString(1);//營業所
this.slp_SAL_ID.Text = dr.IsDBNull(2) ? string.Empty : dr.GetString(2);//營業人員
this.slp_AC_UID.Text = dr.IsDBNull(3) ? string.Empty : dr.GetString(3);//帳務人員
this.txt_PAY_RFNO.Text = dr.IsDBNull(4) ? string.Empty : dr.GetString(4);//結帳統編
this.txt_RFNO.Text = dr.IsDBNull(5) ? string.Empty : dr.GetString(5);//統一編號
this.txt_INV_ADDR.Text = dr.IsDBNull(6) ? string.Empty : dr.GetString(6);//地址
this.txt_TITLE.Text = dr.IsDBNull(7) ? string.Empty : dr.GetString(7);//發票抬頭
//Rika 20110413 修改 若統編開頭為A 則預設為2聯式折讓
if (this.txt_RFNO.Text.Substring(0, 1) == "A")
{
DropDownList drop_DISC_FORM = (DropDownList)this.slp_DISC_FORM.FindControl("D1");
drop_DISC_FORM.SelectedValue = "34";
}
else
{
DropDownList drop_DISC_FORM = (DropDownList)this.slp_DISC_FORM.FindControl("D1");
drop_DISC_FORM.SelectedValue = "33";
}
#region Focus欄位
DropDownList drop_DISC_TYPE = (DropDownList)this.slp_DISC_TYPE.FindControl("D1");
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(drop_DISC_TYPE.ClientID, false);
ScriptManager.RegisterStartupScript(this.up_Condition, typeof(UpdatePanel), "CAA182", s_ScriptManager_Script, true);
#endregion
}
#endregion
#region 檢查回傳資料
else
{
Set_STORE_ID_Default();
#region 若發生錯誤則alert訊息(秀玲要alert訊息)
string s_ScriptManager_Script = "alert('無符合店號或己關店,請重新輸入')";
//.........这里部分代码省略.........
示例8: EditButton_Click
/// <summary>
/// 由檢視模式,轉為編輯模式
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void EditButton_Click(object sender, EventArgs e)
{
try
{
ChangeFormMSTMode(FormViewMode.Edit);
#region 設定預設系統功能鍵 & 畫面Focus欄位
#region 設定編輯模式下對應的預設系統功能鍵
Button but_Default;
TextBox txt_ITEM;
but_Default = (Button)this.FormViewButton.FindControl("EditCommitButton");
txt_ITEM = ((ASP.itm_slp_slp_preitem_ascx)this.FormView1.FindControl("txtITEM")).TextBox_Code;
#endregion
#region 利用 ScriptManager 設定預設系統功能鍵
string s_ScriptManager_Script = @"
function Form_SetDefaultButton()
{
try
{Mod_SetDefaultButton('" + but_Default.ClientID + @"');}
catch(err){setTimeout('Form_SetDefaultButton();', 10);}
}
Form_SetDefaultButton();
";
#endregion
#region Focus欄位
PIC.VDS2G.ACM.CAA.CAACommon CAAComm = new PIC.VDS2G.ACM.CAA.CAACommon();
s_ScriptManager_Script += CAAComm.ToMakeUp_SetFocus_Script(txt_ITEM.ClientID, true);
ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(UpdatePanel), "ITM182", s_ScriptManager_Script, true);
#endregion
#endregion
}
catch (Exception ex)
{
ErrorMsgLabel.Text = ex.Message;
}
finally { }
}//end EditButton_Click
示例9: Page_LoadComplete
protected void Page_LoadComplete(object sender, EventArgs e)
{
if (((ASP.itm_slp_slp_preitem_ascx)FormView1.FindControl("txtITEM")) != null)
if (((ASP.itm_slp_slp_preitem_ascx)FormView1.FindControl("txtITEM")).ReadOnly == true)
((TextBox)((ASP.itm_slp_slp_preitem_ascx)FormView1.FindControl("txtITEM")).FindControl("TextBoxCode")).CssClass = "readtxtbox";
else
((TextBox)((ASP.itm_slp_slp_preitem_ascx)FormView1.FindControl("txtITEM")).FindControl("TextBoxCode")).CssClass = "";
if (((ASP.itm_slp_slp_rootno_ascx)FormView1.FindControl("ddlROOT_NO")) != null)
if (((ASP.itm_slp_slp_rootno_ascx)FormView1.FindControl("ddlROOT_NO")).ReadOnly == true)
((TextBox)((ASP.itm_slp_slp_rootno_ascx)FormView1.FindControl("ddlROOT_NO")).FindControl("TextBoxCode")).CssClass = "readtxtbox";
else
((TextBox)((ASP.itm_slp_slp_rootno_ascx)FormView1.FindControl("ddlROOT_NO")).FindControl("TextBoxCode")).CssClass = "";
RadioButtonList txtDIS_BASE = ((RadioButtonList)FormView3.FindControl("txtDIS_BASE"));
if (txtDIS_BASE != null)
{
if ((txtDIS_BASE.Items[0].Selected == false) && (txtDIS_BASE.Items[1].Selected == false))
txtDIS_BASE.Items[0].Selected = true;
}
RadioButtonList rabSUBSIDY_TYPE = ((RadioButtonList)FormView7.FindControl("rabSUBSIDY_TYPE"));
if (rabSUBSIDY_TYPE != null)
{
if ((rabSUBSIDY_TYPE.Items[0].Selected == false) && (rabSUBSIDY_TYPE.Items[1].Selected == false))
rabSUBSIDY_TYPE.Items[0].Selected = true;
}
#region SLP在FormView中會有問題,所以要呼叫這一個function
Reload_SLP();
#endregion
#region 成本價、零售價、折扣率的限制條件(Javascript),並將欄位[折扣率]的值重新寫入
if (this.FormView3.CurrentMode == FormViewMode.Insert ||
this.FormView3.CurrentMode == FormViewMode.Edit)
{
TextBox tbPrice = (TextBox)((ASP.wui_slp_slp_slpcurrency_ascx)FormView3.FindControl("txtPRICE")).FindControl("TextBoxCode");
TextBox tbCost = (TextBox)((ASP.wui_slp_slp_slpnumber_ascx)FormView3.FindControl("txtCOST")).FindControl("TextBoxCode");
TextBox tbDiscount = (TextBox)((ASP.wui_slp_slp_slpnumber_ascx)FormView3.FindControl("txtDISCOUNT_RATE")).FindControl("TextBoxCode");
tbPrice.Attributes["onblur"] = "if(this.value==''){document.all['" + tbDiscount.ClientID + "'].value=''} else {setDiscountValue();}";
tbCost.Attributes["onblur"] = "if(this.value==''){document.all['" + tbDiscount.ClientID + "'].value=''} else {setDiscountValue();}";
if (Request[((TextBox)((ASP.wui_slp_slp_slpnumber_ascx)FormView3.FindControl("txtDISCOUNT_RATE")).FindControl("TextBoxCode")).UniqueID] != null)
{ tbDiscount.Text = Request[((TextBox)((ASP.wui_slp_slp_slpnumber_ascx)FormView3.FindControl("txtDISCOUNT_RATE")).FindControl("TextBoxCode")).UniqueID].ToString(); }
}
#endregion
#region 模式切換設定預設系統功能鍵 & 畫面Focus欄位(編輯模式在EditButton_Click事件處理)
if (!IsPostBack)
{
#region 設定[新增、檢視]模式下對應的預設系統功能鍵
Button but_Default;
TextBox txt_ITEM;
switch (Request.QueryString["mode"])
{
case "insert":
but_Default = (Button)this.FormViewButton.FindControl("InsertButton");
txt_ITEM = ((ASP.itm_slp_slp_preitem_ascx)this.FormView1.FindControl("txtITEM")).TextBox_Code;
break;
case "readonly":
default:
but_Default = (Button)this.FormViewButton.FindControl("CancelButton");
txt_ITEM = ((ASP.itm_slp_slp_preitem_ascx)this.FormView1.FindControl("txtITEM")).TextBox_Code;
break;
}
#endregion
#region 利用 ScriptManager 設定預設系統功能鍵
string s_ScriptManager_Script = @"
function Form_SetDefaultButton()
{
try
{Mod_SetDefaultButton('" + but_Default.ClientID + @"');}
catch(err){setTimeout('Form_SetDefaultButton();', 10);}
}
Form_SetDefaultButton();
";
#endregion
#region Focus欄位
PIC.VDS2G.ACM.CAA.CAACommon CAAComm = new PIC.VDS2G.ACM.CAA.CAACommon();
s_ScriptManager_Script += CAAComm.ToMakeUp_SetFocus_Script(txt_ITEM.ClientID, true);
ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(UpdatePanel), "ITM182", s_ScriptManager_Script, true);
#endregion
//.........这里部分代码省略.........
示例10: but_TAB4_Open_Click
/// <summary>
/// 頁籤=月結 BUTTON [人工折讓月結解除]鈕
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void but_TAB4_Open_Click(object sender, EventArgs e)
{
try
{
#region 檢查條件
BCO.CAACommon CAAComm = new BCO.CAACommon();
ArrayList arl_Check_Condition = Check_Condition("TAB 月結");
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA181", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#endregion
#region 傳入參數
string s_Now = DateTime.Now.ToString();
ParameterList.Clear();
ParameterList.Add(CAAComm.GetValueSetParameter("CAA18", "string", false));//月結功能代碼
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_4_CLOSE_MONTH.Text, "string", false));//月結年月
ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false));//更新人員
ParameterList.Add(CAAComm.GetValueSetParameter(s_Now, "datetime", false));//更新日期
#endregion
#region 連結資料庫
BCO.RecordingCloseLockInfo bco = new BCO.RecordingCloseLockInfo(ConntionDB);
ArrayList ary_Result = bco.RecordingByOpen(ParameterList, null, ConntionDB);
#endregion
#region 檢查回傳資料
this.ErrorMsgLabel.Text = ary_Result[1].ToString();
#endregion
}
catch (Exception ex)
{
WaringLogProcess(ex.Message);
this.ErrorMsgLabel.Text = ex.Message;
}
finally { Finally_Function(); }
}
示例11: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
#region 清空Message
this.ErrorMsgLabel.Text = string.Empty;
#endregion
if (!IsPostBack)
{
#region 寫入首次載入Page TimeStamp
PageTimeStamp.Value = string.Format("{0}{1}{2}{3}{4}{5}",
DateTime.Now.Year.ToString(),
DateTime.Now.Month.ToString().PadLeft(2, '0'),
DateTime.Now.Day.ToString().PadLeft(2, '0'),
DateTime.Now.Hour.ToString().PadLeft(2, '0'),
DateTime.Now.Minute.ToString().PadLeft(2, '0'),
DateTime.Now.Second.ToString().PadLeft(2, '0')
);
#endregion
#region 設定ToolBar預設狀態
ToolBarInit();
#endregion
#region 設定單據日期預設值
this.SLP_DATE.StartDate = "2010/04/01";
DateTime busdate = System.DateTime.Today.AddDays(-25);
this.SLP_DATE.EndDate = busdate.Year + "/" + busdate.Month + "/25";
#endregion
//this.UpdateProgress2.AssociatedUpdatePanelID = "UpdatePanelControl";
#region 預設系統功能鍵
this.Form.DefaultButton = this.btnExport.UniqueID;
#endregion
}
}
catch (Exception ex)
{
WaringLogProcess(ex.Message);
this.ErrorMsgLabel.Text = ex.Message;
}
finally
{
#region Focus欄位
if (!IsPostBack)
{
BCO.CAACommon CAACommon = new BCO.CAACommon();
string s_ScriptManager_Script = CAACommon.ToMakeUp_SetFocus_Script(this.btnExport.ClientID, false);
ScriptManager.RegisterStartupScript(this.up_ErrorMsg, typeof(UpdatePanel), "CAA351", s_ScriptManager_Script, true);
}
#endregion
}
}
示例12: but_TAB3_Export_Click
protected void but_TAB3_Export_Click(object sender, EventArgs e)
{
try
{
ArrayList arl_Check_Condition = Check_Condition("TAB 報表");
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
BCO.CAACommon CAAComm = new BCO.CAACommon();
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA181", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#region 傳入參數
BCO.CAACommon CAACommon = new BCO.CAACommon();
ParameterList.Clear();
ParameterList.Add(this.slp_3_CLOSE_MONTH_B.Text);//結帳年月起
ParameterList.Add(this.slp_3_CLOSE_MONTH_E.Text);//結帳年月迄
ParameterList.Add(this.slp_3_CLOSE_MONTH_ACCT_B.Text);//結帳年月-財會起
ParameterList.Add(this.slp_3_CLOSE_MONTH_ACCT_E.Text);//結帳年月-財會迄
ParameterList.Add(this.slp_3_PROFIT_NO_B.Text);//利潤中心起
ParameterList.Add(this.slp_3_PROFIT_NO_E.Text);//利潤中心迄
ParameterList.Add(this.slp_3_Z_O_B.Text);//營業所起
ParameterList.Add(this.slp_3_Z_O_E.Text);//營業所迄
ParameterList.Add(this.slp_3_AC_UID_B.Text);//帳務人員起
ParameterList.Add(this.slp_3_AC_UID_E.Text);//帳務人員迄
ParameterList.Add(this.chb_3_Status.Items[0].Selected ? 1 : 0);//狀態:憑證己回
ParameterList.Add(this.chb_3_Status.Items[1].Selected ? 1 : 0);//狀態:憑證未回
ParameterList.Add(this.chb_3_Status.Items[2].Selected ? 1 : 0);//狀態:取具進項憑證
ParameterList.Add(this.chb_3_Status.Items[3].Selected ? 1 : 0);//狀態:取具收據
ParameterList.Add(this.chb_3_Status.Items[4].Selected ? 1 : 0);//狀態:作廢
ParameterList.Add(this.slp_3_DISC_SOURCE.Text);//來源
ParameterList.Add(this.slp_3_DISC_TYPE.Text);//型式
ParameterList.Add(this.slp_3_PERIOD_DATE.StartDate);//申報日期起
ParameterList.Add(this.slp_3_PERIOD_DATE.EndDate);//申報日期迄
ParameterList.Add(this.slp_3_PERIOD_MONTH_B.Text);//申報期別起
ParameterList.Add(this.slp_3_PERIOD_MONTH_E.Text);//申報期別迄
#endregion
#region 連結資料庫
DataTable dt = new DataTable();
BCO.MaintainDiscRecord BCO = new BCO.MaintainDiscRecord(ConntionDB);
dt = BCO.QueryData_ACCT(ParameterList);
#endregion
#region 檢查回傳資料
if (dt.Rows.Count == 0)
{ this.ErrorMsgLabel.Text = "查無資料"; }
#endregion
else
{
DataRow dr = dt.NewRow();
dr["PROFIT_NO"] = "未稅合計";
dr["W_AMT"] = dt.Compute("Sum(W_AMT)", string.Empty);
dr["Z_AMT"] = dt.Compute("Sum(Z_AMT)", string.Empty);
dr["Z_AMT_1"] = dt.Compute("Sum(Z_AMT_1)", string.Empty);
dr["Z_AMT_2"] = dt.Compute("Sum(Z_AMT_2)", string.Empty);
dr["Z_AMT_3"] = dt.Compute("Sum(Z_AMT_3)", string.Empty);
dr["Z_AMT_4"] = dt.Compute("Sum(Z_AMT_4)", string.Empty);
dr["Z_AMT_5"] = dt.Compute("Sum(Z_AMT_5)", string.Empty);
dr["Z_AMT_6"] = dt.Compute("Sum(Z_AMT_6)", string.Empty);
dr["Z_AMT_7"] = dt.Compute("Sum(Z_AMT_7)", string.Empty);
dr["AMT"] = dt.Compute("Sum(AMT)", string.Empty);
dr["PSS_AMT"] = dt.Compute("Sum(PSS_AMT)", string.Empty);
dr["OTHER_AMT"] = dt.Compute("Sum(OTHER_AMT)", string.Empty);
dt.Rows.Add(dr);
Export_Excel(dt);
}
}
//.........这里部分代码省略.........
示例13: but_Query_Click
/// <summary>
/// BUTTON [查詢]鈕
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void but_Query_Click(object sender, EventArgs e)
{
try
{
#region 檢查條件
BCO.CAACommon CAAComm = new BCO.CAACommon();
string s_Type = string.Empty;
if (this.TabContainer1.ActiveTabIndex == 0)
{ s_Type = "BUTTON [查詢]鈕 TAB 銷貨折讓維護"; }
else if (this.TabContainer1.ActiveTabIndex == 1)
{ s_Type = "BUTTON [查詢]鈕 TAB 發票折抵明細查詢"; }
else
{ throw new Exception("頁面資訊錯誤,[查詢]鈕,只有在頁籤為[銷貨折讓維護][發票折抵明細查詢]時才可以使用"); }
ArrayList arl_Check_Condition = Check_Condition(s_Type);
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA181", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#endregion
#region 傳入參數
#region TabContainer 銷貨折讓維護
if (this.TabContainer1.ActiveTabIndex == 0)
{
ParameterList.Clear();
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_DISC_NO.Text, "string", this.chb_LikeSearch.Checked));//[折讓單號]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_FORM.Text, "int", false));//[格式代號]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_SOURCE.Text, "int", false));//[來源]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_GROUP_NO.Text, "string", this.chb_LikeSearch.Checked));//[店群]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID.Text, "string", this.chb_LikeSearch.Checked));//[店號]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_Z_O.Text, "string", false));//[營業所]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_TYPE.Text, "string", false));//[型式]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_ROOT_NO.Text, "string", this.chb_LikeSearch.Checked));//[商品群分類]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_TAX_TYPE.Text, "string", false));//[稅別]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_SAL_ID.Text, "string", this.chb_LikeSearch.Checked));//[營業人員]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_AC_UID.Text, "string", this.chb_LikeSearch.Checked));//[帳務人員]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_DATE.StartDate, "date", false));//[折讓日期]起
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_DATE.EndDate, "date", false));//[折讓日期]迄
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_ACT_DISC_NO.Text, "string", this.chb_LikeSearch.Checked));//[財會折讓單號]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CHG_DISC_DATE.StartDate, "date", false));//[異動折讓日期]起
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CHG_DISC_DATE.EndDate, "date", false));//[異動折讓日期]迄
ParameterList.Add(CAAComm.GetValueSetParameter((this.radl_PROOF_TYPE.Text == "2") ? string.Empty : this.radl_PROOF_TYPE.Text, "int", false));//[憑證已回]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_PROOF_DATE.StartDate, "date", false));//[憑換已回日期]起
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_PROOF_DATE.EndDate, "date", false));//[憑換已回日期]迄
ParameterList.Add(CAAComm.GetValueSetParameter((this.radl_REPROOF_TYPE.Text == "2") ? string.Empty : this.radl_REPROOF_TYPE.Text, "int", false));//[取具進項憑証]
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_REPROOF_NO.Text, "string", this.chb_LikeSearch.Checked));//[發票號碼/收據]
ParameterList.Add(CAAComm.GetValueSetParameter((this.radl_RECEIPT_TYPE.Text == "2") ? string.Empty : this.radl_RECEIPT_TYPE.Text, "int", false));//[取具收據]
ParameterList.Add(CAAComm.GetValueSetParameter((this.radl_CANCEL_TYPE.Text == "2") ? string.Empty : this.radl_CANCEL_TYPE.Text, "int", false));//[作廢]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CANCEL_DATE.StartDate, "date", false));//[作廢日期]起
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CANCEL_DATE.EndDate, "date", false));//[作廢日期]迄
ParameterList.Add(CAAComm.GetValueSetParameter((this.radl_PERIOD_TYPE.Text == "2") ? string.Empty : this.radl_PERIOD_TYPE.Text, "int", false));//[申報]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_PERIOD_DATE.StartDate, "date", false));//[申報日期]起
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_PERIOD_DATE.EndDate, "date", false));//[申報日期]迄
ParameterList.Add(CAAComm.GetValueSetParameter((this.radl_TEMPORAL_TYPE.Text == "2") ? string.Empty : this.radl_TEMPORAL_TYPE.Text, "int", false));//[轉暫收]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_TEMPORAL_DATE.StartDate, "date", false));//[暫收日期]起
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_TEMPORAL_DATE.EndDate, "date", false));//[暫收日期]迄
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_PAY_RFNO.Text, "string", this.chb_LikeSearch.Checked));//[結帳統編]
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_RFNO.Text, "string", this.chb_LikeSearch.Checked));//[統一編號]
ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_INV_NO.Text, "string", this.chb_LikeSearch.Checked));//[地址]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_UAMT.Text, "int", false));//[折讓金額(未稅)]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_UAMT.Operator, "int", false));//[折讓金額(未稅)]Operator
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_TAX.Text, "int", false));//[折讓稅額]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_TAX.Operator, "int", false));//[折讓稅額]Operator
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_AMT.Text, "int", false));//[總金額]
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_DISC_AMT.Operator, "int", false));//[總金額]Operator
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CLOSE_MONTH_B.Text, "string", false));//[結帳年月]起
//20110505 rika insert
//.........这里部分代码省略.........
示例14: but_TAB3_Print_Total
/// <summary>
/// 頁籤=[報表] 欄位[報表類型]=彙總,按下Button[匯出]鈕
/// </summary>
private void but_TAB3_Print_Total()
{
try
{
#region 檢查條件
BCO.CAACommon CAAComm = new BCO.CAACommon();
ArrayList arl_Check_Condition = Check_Condition("TAB 報表");
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.up_Msg, typeof(UpdatePanel), "CAA181", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#endregion
#region 傳入參數
ParameterList.Clear();
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_3_CLOSE_MONTH_B.Text, "string", false));//[結帳年月]起 20110520修改為起迄
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_3_CLOSE_MONTH_E.Text, "string", false));//[結帳年月]迄
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_3_CLOSE_MONTH_ACCT_B.Text, "string", false));//[結帳年月-財會]起 20110520修改為起迄
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_3_CLOSE_MONTH_ACCT_E.Text, "string", false));//[結帳年月-財會]迄
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_3_PROFIT_NO_B.Text, "string", false));//[利潤中心]起
ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_3_PROFIT_NO_E.Text, "string", false));//[利潤中心]迄
ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false));//V_LOG_UID
#endregion
#region 連接資料庫
DataSet ds_Return = new DataSet();
BCO.MaintainDiscRecord bco = new BCO.MaintainDiscRecord(ConntionDB);
ds_Return = bco.QUERY_CAA18_REPORT_SUMMARY(ParameterList);
#endregion
#region 檢查回傳資料
if (ds_Return.Tables["SUMMARY"].Rows.Count == 0)
{
this.ErrorMsgLabel.Text = "查無資料";
return;
}
#endregion
#region 組合匯出的Excel
#region 設定變數
ExcelXmlWorkbook exl_WorkSheet = new ExcelXmlWorkbook();
Worksheet sheet = exl_WorkSheet[0];
sheet.Name = "折讓入帳彙總表";
#region 設定長和寬
int i_Vertical = 0;//直的有幾個欄位(依據資料庫[利潤中心])
int i_Horizontal = 0;//橫的有幾個欄位(依據資料庫[型式])
int i_Vertical_Fix = 3;//直的固定欄位[型式、稅別、合計]
int i_Horizontal_Fix = 4;//橫的固定欄位[標題抬頭、利潤中心抬頭、合計上方要空一行、合計]
i_Vertical = ds_Return.Tables["PROFIT"].Rows.Count + i_Vertical_Fix;
i_Horizontal = (ds_Return.Tables["DISC_TYPE"].Rows.Count * 3) + i_Horizontal_Fix;
#endregion
#endregion
#region 設定格式
#region 設定欄位寬度
for (int i_Style = 0; i_Style < i_Vertical; i_Style++)
{ sheet.Columns(i_Style).Width = 100; }
//.........这里部分代码省略.........
示例15: btn_Query_Click
protected void btn_Query_Click(object sender, EventArgs e)
{
try
{
#region 檢查條件
CAAModel.CAACommon CAAComm = new CAAModel.CAACommon();
ArrayList arl_Check_Condition = Check_Condition("BUTTON [查詢]鈕");
#region 如果檢查有誤,則Return
if (arl_Check_Condition[1].ToString() != string.Empty)
{
#region 錯誤訊息
this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();//錯誤訊息rika
#endregion
#region Focus欄位
if (arl_Check_Condition[0].ToString() != string.Empty)
{
string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
ScriptManager.RegisterStartupScript(this.up_ErrorMsg, typeof(UpdatePanel), "CAA321", s_ScriptManager_Script, true);
}
#endregion
return;
}
#endregion
#endregion
DataBind();
}
catch (Exception ex)
{
WaringLogProcess(ex.Message);
this.ErrorMsgLabel.Text = ex.Message;
}
}