本文整理汇总了C#中Js.BLL.BaseDal.Update方法的典型用法代码示例。如果您正苦于以下问题:C# BaseDal.Update方法的具体用法?C# BaseDal.Update怎么用?C# BaseDal.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Js.BLL.BaseDal
的用法示例。
在下文中一共展示了BaseDal.Update方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["WarehouseID"] = this.txtWarehouseID.Text.Trim().ToUpper();
dr["WarehouseName"] = this.txtWarehouseName.Text;
dr["Contact"] = this.txtContact.Text.Trim();
dr["ContactPhone"] = this.txtContactPhone.Text.Trim();
dr["Address"] = this.txtAddress.Text.Trim();
dr["Memo"] = this.txtMemo.Text.Trim();
dr["CreateUserName"] = this.txtCreateUserName.Text;
dr["CreateDate"] = this.txtCreateDate.Text;
dr["LastModifyUserName"] = Session["User"].ToString();
dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
dr["CheckUserName"] = this.txtCheckUserName.Text;
if (this.txtCheckDate.Text.Length > 0)
dr["CheckDate"] = this.txtCheckDate.Text;
dr["StopUserName"] = this.txtStopUserName.Text;
if (this.txtStopDate.Text.Length > 0)
dr["StopDate"] = this.txtStopDate.Text;
if (ID.Length > 0)
dal.Update(dr, ID);
else
{
dal.Add(dr);
//插入標籤數量
Js.BLL.Label.StyleDal sdal = new Js.BLL.Label.StyleDal(cnKey);
sdal.InsertWarehousePagesByWID(this.txtWarehouseID.Text.Trim().ToUpper(), Session["User"].ToString());
}
//Response.Redirect("Departments.aspx?FormID=" + Server.UrlEncode(FormID));
Response.Redirect("WarehouseView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtWarehouseID.Text));
}
示例2: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["EnterpriseID"] = this.txtEnterpriseID.Text;
dr["EnterpriseName"] = this.txtEnterpriseName.Text;
dr["BillID"] = this.txtBillID.Text.Trim();
dr["QtyTotal"] = this.txtQtyTotal.Text.Trim();
dr["BillState"] = this.txtBillState.Text.Trim();
dr["CreateUserName"] = this.txtCreateUserName.Text;
dr["CreateDate"] = this.txtCreateDate.Text;
dr["LastModifyUserName"] = Session["User"].ToString();
dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;
if (this.txtEP_CheckDate.Text.Length > 0)
dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;
dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;
if (this.txtBU_CheckDate.Text.Length > 0)
dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
Response.Redirect("InvalidLabelView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
}
示例3: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["Flag"] = Flag;//旗標
dr["BillID"] = this.txtBillID.Text;//上架單號
if (this.txtEnableDate.Text.Length > 0) dr["EnableDate"] = this.txtEnableDate.DateValue;//日期
dr["EnterpriseID"] = this.txtEnterpriseID.Text;//企業用戶編號
dr["EnterpriseName"] = this.txtEnterpriseName.Text;//企業用戶名稱
dr["BillState"] = this.ddlBillState.SelectedIndex;//狀態 0未上架、1異常待修正、2檢查OK、3上架中、4已上架
dr["QtyTotal"] = int.Parse(this.txtQtyTotal.Text);//數量合計
if (this.txtCreateDate.Text.Length > 0) dr["CreateDate"] = this.txtCreateDate.Text;//建檔日期
dr["CreateUserName"] = this.txtCreateUserName.Text;//建檔人員
if (this.txtLastModifyDate.Text.Length > 0) dr["LastModifyDate"] = this.txtLastModifyDate.Text;//異動日期
dr["LastModifyUserName"] = this.txtLastModifyUserName.Text;//異動人員
if (this.txtEP_CheckDate.Text.Length > 0) dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;//建檔日期
dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;//營運覆核
if (this.txtBU_CheckDate.Text.Length > 0) dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;//營運覆核日期
dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;//營運覆核用戶
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
Response.Redirect("EnableLabelNoView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
}
示例4: btnStop_Click
protected void btnStop_Click(object sender, EventArgs e)
{
DataRow dr = ((DataTable)ViewState["dt"]).Rows[0];
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
if (this.txtStopUserName.Text.Length > 0)
{
dr["StopUserName"] = "";
dr["StopDate"] = DBNull.Value;
}
else
{
dr["StopUserName"] = Session["User"].ToString();
dr["StopDate"] = DateTime.Now;
}
if (FormID == "EP_ProductLogistics")
{
dal.Update(dr, this.txtLogisticsID.Text, "EnterpriseID='" + this.txtEnterpriseID.Text + "' and flag=1 ");
ViewState["StrWhere"] = string.Format(" LogisticsID='{0}' and EnterpriseID='{1}' and flag=1 ", this.txtLogisticsID.Text, this.txtEnterpriseID.Text);
}
else
{
dal.Update(dr, this.txtLogisticsID.Text, "EnterpriseID='" + this.txtEnterpriseID.Text + "' and flag=2");
ViewState["StrWhere"] = string.Format(" LogisticsID='{0}' and EnterpriseID='{1}' and flag=2", this.txtLogisticsID.Text, this.txtEnterpriseID.Text);
}
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
}
示例5: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["StateID"] = this.txtStateListID.Text;
dr["StateName"] = this.txtStateName.Text;
dr["Style"] = this.ddlStyle.SelectedIndex;
dr["Description"] = this.txtMemo.Text;
dr["ImageProvider"] = this.chkImageProvider.Checked;
if (this.txtStopDate.Text.Length > 0)
dr["StopDate"] = this.txtStopDate.Text;
dr["StopUserName"] = this.txtStopUserName.Text;
if (this.txtCreateDate.Text.Length > 0)
dr["CreateDate"] = this.txtCreateDate.Text;
dr["CreateUserName"] = this.txtCreateUserName.Text;
dr["LastModifyDate"] = DateTime.Now;// this.txtLastModifyDate.Text;//異動日期
dr["LastModifyUserName"] = Session["User"].ToString();// this.txtLastModifyUserName.Text;//異動人員
if (this.txtCheckDate.Text.Length > 0)
dr["CheckDate"] = this.txtCheckDate.Text;
dr["CheckUserName"] = this.txtCheckUserName.Text;
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
Response.Redirect("StateListView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtStateListID.Text));
}
示例6: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["ProductionUnitID"] = this.txtProductionUnitID.Text;
dr["ProductionUnitName"] = this.txtProductionUnitName.Text;
dr["Memo"] = this.txtMemo.Text.Trim();
dr["CreateUserName"] = this.txtCreateUserName.Text;
dr["CreateDate"] = this.txtCreateDate.Text;
dr["LastModifyUserName"] = Session["User"].ToString();
dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
dr["CheckUserName"] = this.txtCheckUserName.Text;
if (this.txtCheckDate.Text.Length > 0)
dr["CheckDate"] = this.txtCheckDate.Text;
dr["StopUserName"] = this.txtStopUserName.Text;
if (this.txtStopDate.Text.Length > 0)
dr["StopDate"] = this.txtStopDate.Text;
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
//Response.Redirect("Departments.aspx?FormID=" + Server.UrlEncode(FormID));
Response.Redirect("ProductionUnitView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtProductionUnitID.Text));
}
示例7: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["MemberID"] = this.txtMemberID.Text;
dr["Country"] = this.EddlCountry.Text;
dr["Password"] = this.txtPassword.Text.Trim();
dr["PasswordHint"] = this.txtPasswordHint.Text.Trim();
dr["Name"] = this.txtName.Text.Trim();
if (this.ddlSex.SelectedIndex > 0)
dr["Sex"] = 1;
else
dr["Sex"] = 0;
dr["EMail"] = this.txtEMail.Text;
dr["SpareEMail"] = this.txtSpareEMail.Text;
if(this.txtBirthday.Text.Trim().Length>0)
dr["Birthday"] = this.txtBirthday.Text;
dr["CellPhone"] = this.txtCellPhone.Text;
dr["LinkPhone"] = this.txtLinkPhone.Text;
dr["ZipCode1"] = this.txtZipCode1.Text;
dr["Address1"] = this.txtAddress1.Text;
dr["ZipCode2"] = this.txtZipCode2.Text;
dr["Address2"] = this.txtAddress2.Text;
dr["WebSite"] = this.txtWebSite.Text;
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
Response.Redirect("MemberView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtMemberID.Text));
}
示例8: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID,cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
// dr["ID"] = this.txtEnterpriseID.Text.Trim().ToUpper() + "_" + this.txtStyleID.Text.Trim().ToUpper();
// dr["EnterpriseID"] = this.txtEnterpriseID.Text.ToUpper();
dr["StyleName"] = this.txtStyleName.Text;
dr["StyleID"] = this.txtStyleID.Text.Trim().ToUpper();
dr["Volumes"] = this.txtVolumes.DataValue;
dr["StdPages"] = this.txtStdPages.DataValue;
dr["ImageLocation"] = this.ddlImageLocation.Text.Trim();
dr["Length"] = this.txtLength_R.DataValue;
dr["Width"] = this.txtWidth_R.DataValue;
dr["Height"] = this.txtHeight_R.DataValue;
dr["QRContent"] = this.ddlQRContent.Text.Trim();
dr["ProductionNo"] = this.txtProductionNo.Text.Trim();
dr["QR_X"] = this.txtQR_X_R.DataValue;
dr["QR_Y"] = this.txtQR_Y_R.DataValue;
dr["QR_Length"] = this.txtQR_Length_R.DataValue;
dr["QR_Width"] = this.txtQR_Width_R.DataValue;
dr["NowVolumes"] = this.txtNowVolumes.DataValue;
dr["NowPages"] = this.txtNowPages.DataValue;
dr["ImagePath"] = this.txtImagePath.Text.Trim();
dr["ServiceYears"] = byte.Parse(this.txtServiceYears.Text.Trim());
dr["EnableMonths"] = byte.Parse(this.ddlEnableMonths.SelectedValue.ToString());
dr["Description"] = this.txtDescription.Text.Trim();
dr["AntiFakeDesc1"] = this.txtAntiFakeDesc1.Text.Trim();
dr["ImagePath1"] = this.txtImagePath1.Text.Trim();
dr["AntiFakeDesc2"] = this.txtAntiFakeDesc2.Text.Trim();
dr["ImagePath2"] = this.txtImagePath2.Text.Trim();
dr["AntiFakeDesc3"] = this.txtAntiFakeDesc3.Text.Trim();
dr["ImagePath3"] = this.txtImagePath3.Text.Trim();
dr["CreateUserName"] = this.txtCreateUserName.Text;
dr["CreateDate"] = this.txtCreateDate.Text;
dr["LastModifyUserName"] = Session["User"].ToString();
dr["LastModifyDate"] = DateTime.Now;//.ToString(Js.Com.User.strDateFormat);
dr["CheckUserName"] = this.txtCheckUserName.Text;
if (this.txtCheckDate.Text.Length > 0)
dr["CheckDate"] = this.txtCheckDate.Text;
dr["StopUserName"] = this.txtStopUserName.Text;
if (this.txtStopDate.Text.Length > 0)
dr["StopDate"] = this.txtStopDate.Text;
if (ID.Length > 0)
dal.Update(dr, ID);
else
{
dal.Add(dr);
//插入標籤數量
Js.BLL.Label.StyleDal sdal = new Js.BLL.Label.StyleDal(cnKey);
sdal.InsertWarehousePagesByStyleID(this.txtStyleID.Text.Trim().ToUpper(), Session["User"].ToString());
}
Response.Redirect("StyleView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtStyleID.Text));
}
示例9: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["Flag"] = Flag;//旗標 Flag=1 訂單 Flag=2 生產計劃單
dr["BillID"] = this.txtBillID.Text;//單號
if (this.txtBillDate.Text.Length > 0) dr["BillDate"] = this.txtBillDate.Text;//日期
dr["CustomerPO"] = this.txtCustomerPO.Text;//客戶PO
dr["EnterpriseID"] = this.txtEnterpriseID.Text;//企業用戶編號
dr["EnterpriseName"] = this.txtEnterpriseName.Text;//企業用戶名稱
dr["Contact"] = this.txtContact.Text;//連絡人員
dr["ContactPhone"] = this.txtContactPhone.Text;//聯絡電話
dr["Fax"] = this.txtFax.Text;//公司傳真
dr["BusPersonID"] = this.txtBusPersonID.Text;//業務員編號
dr["BusPersonName"] = this.txtBusPersonName.Text;//業務員姓名
dr["BillState"] = ddlBillState.SelectedIndex;//單況 0:有效 1:結案
dr["DeliverCountry"] = this.txtDeliverCountry.Text;//送貨地址國別
dr["DeliverAddress"] = this.txtDeliverAddress.Text;//送貨地址
dr["DeliverMehtod"] = this.txtDeliverMehtod.Text;//交貨方式
dr["Memo"] = this.txtMemo.Text;//備註
//dr["TotalPages"] = int.Parse(this.txtTotalPages.Text);//張數合計
if (this.txtCreateDate.Text.Length > 0) dr["CreateDate"] = this.txtCreateDate.Text;//建檔日期
dr["CreateUserName"] = this.txtCreateUserName.Text;//建檔人員
if (this.txtLastModifyDate.Text.Length > 0) dr["LastModifyDate"] = this.txtLastModifyDate.Text;//異動日期
dr["LastModifyUserName"] = this.txtLastModifyUserName.Text;//異動人員
if (this.txtBU_CheckDate.Text.Length > 0) dr["CheckDate"] = this.txtBU_CheckDate.Text;//營運覆核日期
dr["CheckUserName"] = this.txtBU_CheckUserName.Text;//營運覆核人員
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
DataTable dtSub1 = dal.GetSubDetail("").Tables[0];
DataTable newdtb = Js.Com.JsonHelper.Json2Dtb(HdnSubDetail1.Value);
for (int i = 0; i < newdtb.Rows.Count; i++)
{
DataRow dr1 = dtSub1.NewRow();
dr1["Flag"] = Flag;
dr1["BillID"] = this.txtBillID.Text;
dr1["EnterpriseID"] = this.txtEnterpriseID.Text;
dr1["BillDate"] = this.txtBillDate.DateValue;
for (int j = 0; j < newdtb.Columns.Count; j++)
{
dr1[newdtb.Columns[j].ColumnName] = newdtb.Rows[i][j];
}
dtSub1.Rows.Add(dr1);
}
dtSub1.TableName = "LB_OrderSub";
dal.SaveDetail(dtSub1, ID);
Response.Redirect("OrderView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
}
示例10: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["BillID"] = this.txtBillID.Text;//單號
if (this.txtBillDate.Text.Length > 0) dr["BillDate"] = this.txtBillDate.Text;//日期
dr["StyleID"] = this.txtStyleID1.Value;
dr["SourceBillID"] = this.txtSourceBillID.Text;
dr["ProducePages"] = this.txtProducePages.Text;
dr["StdPages"] = this.txtStdPages.Text;
dr["Volumes"] = this.txtVolumes.Text;
dr["StartLabelNo"] = this.txtStartLabelNo.Text;
dr["EndLabelNo"] = this.txtEndLabelNo.Text;
dr["ProductionUnitID"] = this.ddlProductionUnitID.SelectedValue;
dr["ScheduleBillID"] = this.txtScheduleBillID.Text;
if (this.txtPreInStockDate.Text.Length > 0) dr["PreInStockDate"] = this.txtPreInStockDate.Text;
dr["BillState"] = this.ddlBillState.SelectedIndex;
if (this.txtCreateDate.Text.Length > 0) dr["CreateDate"] = this.txtCreateDate.Text;//建檔日期
dr["CreateUserName"] = this.txtCreateUserName.Text;//建檔人員
dr["LastModifyDate"] = DateTime.Now;// this.txtLastModifyDate.Text;//異動日期
dr["LastModifyUserName"] = Session["User"].ToString();// this.txtLastModifyUserName.Text;//異動人員
if (this.txtCheckDate.Text.Length > 0) dr["CheckDate"] = this.txtCheckDate.Text;//營運覆核日期
dr["CheckUserName"] = this.txtCheckUserName.Text;//營運覆核用戶
dr["Memo"] = this.txtMemo.Text;
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
DataTable dtSub1 = dal.GetSubDetail("").Tables[0];
DataTable newdtb = Js.Com.JsonHelper.Json2Dtb(HdnSubDetail1.Value);
for (int i = 0; i < newdtb.Rows.Count; i++)
{
DataRow dr1 = dtSub1.NewRow();
dr1["BillID"] = this.txtBillID.Text;
//dr1["EnterpriseID"] = this.txtEnterpriseID.Text;
dr1["BillDate"] = this.txtBillDate.DateValue;
for (int j = 0; j < newdtb.Columns.Count; j++)
{
dr1[newdtb.Columns[j].ColumnName] = newdtb.Rows[i][j];
}
dtSub1.Rows.Add(dr1);
}
dtSub1.TableName = "LB_ProductionSub";
dal.SaveDetail(dtSub1, ID);
Response.Redirect("ProductionView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
}
示例11: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["Flag"] = 2;
dr["EnterPriseID"] = Session["EnterPriseID"].ToString();
dr["EnterpriseName"] = Session["EnterpriseName"].ToString();
dr["ResumeID"] = this.txtResumeID.Text.Trim();
dr["ProductID"] = this.txtProductID.Text;
dr["ProductName"] = this.txtProductName.Text;
if (this.txtProduceDate.Text.Length > 0)
dr["ProduceDate"] = DateTime.Parse(this.txtProduceDate.Text);
dr["HasGarantee"] = this.ckbHasGarantee.Checked;
if (this.txtProduceDate.Text.Length > 0)
dr["GaranteeDate"] = DateTime.Parse(this.txtGaranteeDate.Text);
dr["OfficalUrl"] = this.txtOfficalUrl.Text.Trim();
dr["ServicePhone"] = this.txtServicePhone.Text.Trim();
dr["Description"] = this.txtDescription.Text.Trim();
dr["ResumeOfficalUrl"] = this.txtResumeOfficalUrl.Text.Trim();
dr["EPResumeID"] = this.txtEPResumeID.Text.Trim();
dr["CreateUserName"] = this.txtCreateUserName.Text;
dr["CreateDate"] = this.txtCreateDate.Text;
dr["LastModifyUserName"] = Session["User"].ToString();
dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
dr["BU_CheckUserName"] = "";
dr["EP_CheckUserName"] = "";
//dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;
//if (this.txtBU_CheckDate.Text.Length > 0)
// dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;
//dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;
//if (this.txtEP_CheckDate.Text.Length > 0)
// dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;
dr["StopUserName"] = this.txtStopUserName.Text;
if (this.txtStopDate.Text.Length > 0)
dr["StopDate"] = this.txtStopDate.Text;
dr["UploadUserName"] = "";
dr["State"] = 0;
if (FormID == "EP_ProductResumeNoCheck" && ID.Length > 0)
//dal.Update(dr, this.txtEnterpriseID.Text, string.Format(" ResumeID='{0}'", this.txtResumeID.Text));
dal.Update(dr, this.txtResumeID.Text, string.Format(" EnterpriseID='{0}' and flag=2", this.txtEnterpriseID.Text));
else
dal.Add(dr);
Response.Redirect("ProductResumeView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtResumeID.Text));
}
示例12: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["EnterPriseID"] = Session["EnterPriseID"].ToString();
dr["EnterpriseName"] = Session["EnterpriseName"].ToString();
dr["PersonID"] = this.txtPersonID.Text;
dr["DepartmentID"] = this.ddlDepartmentID.SelectedValue.ToString();
dr["PersonName"] = this.txtPersonName.Text;
dr["PersonEName"] = this.txtPersonEName.Text.Trim();
//dr["IDNumber"] = this.txtIDNumber.Text.Trim();
//if (this.txtBirthday.Text.Length > 0)
// dr["Birthday"] = this.txtBirthday.Text;
dr["Post"] = this.txtPost.Text.Trim();
//dr["HomePhone"] = this.txtHomePhone.Text.Trim();
dr["CellPhone"] = this.txtCellPhone.Text.Trim();
dr["Email"] = this.txtEmail.Text.Trim();
//if (this.txtOnJobDate.Text.Length > 0)
// dr["OnJobDate"] = this.txtOnJobDate.Text;
//if (this.txtLeftJobDate.Text.Length > 0)
// dr["LeftJobDate"] = this.txtLeftJobDate.Text;
//dr["LinkMan"] = this.txtLinkMan.Text.Trim();
//dr["Relation"] = this.txtRelation.Text.Trim();
//dr["LinkPhone"] = this.txtLinkPhone.Text.Trim();
dr["ContactAddress"] = this.txtContactAddress.Text.Trim();
//dr["HomeAddress"] = this.txtHomeAddress.Text.Trim();
dr["Memo"] = this.txtMemo.Text.Trim();
dr["CreateUserName"] = this.txtCreateUserName.Text;
dr["CreateDate"] = this.txtCreateDate.Text;
dr["LastModifyUserName"] = Session["User"].ToString();
dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
dr["CheckUserName"] = this.txtCheckUserName.Text;
if (this.txtCheckDate.Text.Length > 0)
dr["CheckDate"] = this.txtCheckDate.Text;
dr["StopUserName"] = this.txtStopUserName.Text;
if (this.txtStopDate.Text.Length > 0)
dr["StopDate"] = this.txtStopDate.Text;
if (ID.Length > 0)
dal.Update(dr, ID, "EnterpriseID='" + this.txtEnterpriseID.Text + "'");
else
dal.Add(dr);
Response.Redirect("PersonView.aspx?FormID=" + Server.UrlEncode(FormID)+ "&ID=" + Server.UrlEncode(this.txtPersonID.Text));
}
示例13: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
//BaseDal
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
DataTable dt = dal.GetRecord("1=1");
string OrderCode = dt.Rows[0]["OrderCode"].ToString();
DataRow dr = dt.NewRow();
dr["OrderCode"] = this.txtOrderCode.Value;
dr["ScheduleCode"] = this.txtScheduleCode.Value;
dr["ProductionCode"] = this.txtProductionCode.Value;
dr["InStockCode"] = this.txtInStockCode.Value;
dr["InvalidLabelCode"] = this.txtInvalidLabelCode.Value;
dr["OutStockCode"] = this.txtDeliverCode.Value;
dr["ReturnLabelCode"] = this.txtReturnLabelCode.Value;
dr["TransferCode"] = this.txtTransferCode.Value;
dr["EnableLabelNoCode"] = this.txtEnableLabelNoCode.Value;
dr["LabelNoActionCode"] = this.txtLabelNoActionCode.Value;
dr["BatchActionCode"] = this.txtBatchActionCode.Value;
dr["LabelRegisterCode"] = this.txtLabelRegisterCode.Value;
dr["BatchRegisterCode"] = this.txtBatchRegisterCode.Value;
dr["PercentDecimalDigits"] = this.ddlPercentDecimalDigits.SelectedValue;
int ServiceYears;
int.TryParse(this.txtServiceYears.Text.Trim(), out ServiceYears);
this.txtServiceYears.Text = ServiceYears.ToString();
dr["ServiceYears"] = ServiceYears;
dr["EnableMonths"] = this.ddlEnableMonths.Text;
if (this.txtClearDate.Text.Length > 0)
dr["ClearDate"] = this.txtClearDate.Text;
if (this.txtCloseDate.Text.Length > 0)
dr["CloseDate"] = this.txtCloseDate.Text;
dr["LastModifyUserName"] = Session["User"].ToString();
if (this.txtLastModifyDate.Text.Length > 0)
dr["LastModifyDate"] = DateTime.Now;
if (OrderCode.Length > 0)
dal.Update(dr, OrderCode);
else
dal.Add(dr);
//BindData();
this.btnEdit.Enabled = true;
this.btnSave.Enabled = false;
this.btnCancel.Enabled = false;
InitialCtl();
}
示例14: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
DataRow dr = dt.NewRow();
dr["Flag"] = Flag;//旗標
dr["BillID"] = this.txtBillID.Text;//單號
if (this.txtBillDate.Text.Length > 0) dr["BillDate"] = this.txtBillDate.DateValue;//日期
dr["EnterpriseID"] = this.txtEnterpriseID.Text;//企業用戶編號
dr["EnterpriseName"] = this.txtEnterpriseName.Text;//企業用戶名稱
dr["ProduceBillID"] = this.txtProduceBillID.Text;//單號
dr["OrderBillID"] = this.txtOrderBillID.Text;//訂單單號
dr["OrderSubID"] = 0;// int.Parse(this.txtOrderSubID.Text);//訂單序號
dr["StyleID"] = this.txtStyleID.Text;//款式編號
dr["LabelMode"] = this.txtLabelMode.Text;//標籤模式
dr["RemainQty"] = 0;// int.Parse(this.txtRemainQty.Text);//保留數量
dr["RemainStartNo"] = this.txtRemainStartNo.Text;//保留起始序號
dr["RemainEndNo"] = this.txtRemainEndNo.Text;//保留終止序號
dr["QtyTotal"] = int.Parse(this.txtQtyTotal.Text);//入庫張數合計
dr["LabelReels"] = int.Parse(this.txtLabelReels.Text);//標籤卷數合計
dr["IsNoDone"] = this.ckbIsNoDone.Checked;//序號產生
dr["IsCheckImage"] = this.ckbIsCheckImage.Checked;//圖檔檢查
dr["IsConfirmBad"] = false;// this.ckbIsConfirmBad.Checked;//壞品確認
dr["IsImportImage"] = this.ckbIsImportImage.Checked;//圖檔匯入
dr["IsInvalidBad"] = this.ckbIsInvalidBad.Checked;//壞品作廢
dr["InvalidBillID"] = this.txtInvalidBillID.Text;//作廢單號
dr["LabelFrom"] = this.RadioButton4.Checked;//入庫狀況
dr["Memo"] = this.txtMemo.Text;//備註
if (this.txtCreateDate.Text.Length > 0) dr["CreateDate"] = this.txtCreateDate.Text;//建檔日期
dr["CreateUserName"] = this.txtCreateUserName.Text;//建檔人員
if (this.txtLastModifyDate.Text.Length > 0) dr["LastModifyDate"] = this.txtLastModifyDate.Text;//異動日期
dr["LastModifyUserName"] = this.txtLastModifyUserName.Text;//異動人員
//if (this.txtEP_CheckDate.Text.Length > 0) dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;//建檔日期
//dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;//營運覆核
if (this.txtBU_CheckDate.Text.Length > 0) dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;//營運覆核日期
dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;//營運覆核用戶
if (ID.Length > 0)
dal.Update(dr, ID);
else
dal.Add(dr);
Response.Redirect("StockInView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
}
示例15: btnCheck_Click
protected void btnCheck_Click(object sender, EventArgs e)
{
DataRow dr = ((DataTable)ViewState["dt"]).Rows[0];
Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
if (this.txtCheckUserName.Text.Length > 0)
{
dr["CheckUserName"] = "";
dr["CheckDate"] = DBNull.Value;
}
else
{
dr["CheckUserName"] = Session["User"].ToString();
dr["CheckDate"] = DateTime.Now;
}
dal.Update(dr,this.txtEnterpriseID.Text);
DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
BindData(dt);
}