protected void FormView_SOFile_ItemInserting(object sender, FormViewInsertEventArgs e) { TextBox txt1 = (TextBox)FormView_SOFile.FindControl("CircularsTextBox"); TextBox txt2 = (TextBox)FormView_SOFile.FindControl("DateOfCircularsTextBox"); TextBox txt3= (TextBox)FormView_SOFile.FindControl("CircularsTextBox"); TextBox txt4 = (TextBox)FormView_SOFile.FindControl("SubjectTextBox"); TextBox txt5 = (TextBox)FormView_SOFile.FindControl("PageNoTextBox"); DateTime curr_date = DateTime.Now; if (txt1.Text=="") { e.Values["Circulars"] = 0; } if (txt2.Text == "") { e.Values["DateOfCirculars"] = curr_date; } if (txt4.Text == "") { e.Values["Subject"] = ""; } if (txt5.Text == "") { e.Values["PageNo"] = 0; } DropDownList DropDownList1 = FormView_SOFile.FindControl("DropDownList1") as DropDownList; e.Values["Department"] = DropDownList1.SelectedValue; }
protected void FormView_Diary_ItemInserting(object sender, FormViewInsertEventArgs e) { ListBox ListBox_office = FormView_Diary.FindControl("ListBox_officename") as ListBox; int[] selectedIndices = ListBox_office.GetSelectedIndices(); e.Values["NoOfOfficeinspected"] = selectedIndices.Length; ViewState["SelectedItems"] = selectedIndices; }
protected void formView_ItemInserting(object sender, FormViewInsertEventArgs e) { if (e.Values["StrategyID"].ToString() == "None") e.Values["Strategy"] = null; if (e.Values["Category"].ToString() == "None") e.Values["Category"] = null; }
protected void FormView_OutWardRegister_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList Dropdown_CopyTo = FormView_OutWardRegister.FindControl("DropDownList_CopyTo") as DropDownList; e.Values["Copy_To"] = Dropdown_CopyTo.SelectedValue; ListBox ListBox_Office = FormView_OutWardRegister.FindControl("ListBox_Office_CopyTo") as ListBox; e.Values["Office_Copy_To"] = ListBox_Office.SelectedValue; }
protected void FormView_SunavniRegister_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDownList_AppealNo = FormView_SunavniRegister.FindControl("DropDownList_AppealNo") as DropDownList; e.Values["AppealNo"] = DropDownList_AppealNo.SelectedValue; DropDownList DropDownList_Versus = FormView_SunavniRegister.FindControl("DropDownList_EmployeeName") as DropDownList; e.Values["Versus"] = DropDownList_Versus.SelectedValue; }
protected void FormView_Vigilance_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDownList1 = FormView_Vigilance.FindControl("designation") as DropDownList; e.Values["emp_desig"] = DropDownList1.SelectedValue; DropDownList DropDown_employeename = FormView_Vigilance.FindControl("DropDownList_employeename") as DropDownList; e.Values["empname"] = DropDown_employeename.SelectedValue; }
protected void FormView_BookForm_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDown_EmployeeName = FormView_BookFormRegister.FindControl("DropDownList_EmployeeName") as DropDownList; e.Values["Emp_Name"] = DropDown_EmployeeName.SelectedValue; DropDownList DropDownList1 = FormView_BookFormRegister.FindControl("DropDownListDepartment") as DropDownList; e.Values["Dept_name"] = DropDownList1.SelectedValue; }
protected void FormView_Marriagecertificate_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDown_Taluka = FormView_Marriagecertificate.FindControl("DropDownList_Taluka") as DropDownList; e.Values["Taluka"] = DropDown_Taluka.SelectedValue; DropDownList DropDown_District = FormView_Marriagecertificate.FindControl("DropDownList_District") as DropDownList; e.Values["District"] = DropDown_District.SelectedValue; }
protected void FormView_GrantRegister_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDownList1 = FormView_GrantRegister.FindControl("DropDownListBillNo") as DropDownList; if (DropDownList1 != null) { e.Values["BillNo"] = DropDownList1.SelectedValue; } }
protected void FormView_Inquiry_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDownEmployeeName = FormView_Inquiry.FindControl("Name_Of_EmployeeDropDown") as DropDownList; e.Values["Name_Of_Employee"] = DropDownEmployeeName.SelectedValue; DropDownList DropDownDesignation = FormView_Inquiry.FindControl("Drop_employeedesignation") as DropDownList; e.Values["Designation_Of_Employee"] = DropDownDesignation.SelectedValue; }
protected void FormView_Tarankit_ItemInserting(object sender, FormViewInsertEventArgs e) { RadioButtonList Radio_Tarankit = FormView_Tarankit.FindControl("Radio_tarankit") as RadioButtonList; e.Values["Tarankit_Atarnkit"] = Radio_Tarankit.SelectedValue; DropDownList Drop_mlaname = FormView_Tarankit.FindControl("Drop_mlaname") as DropDownList; e.Values["mlaName"] = Drop_mlaname.SelectedValue; }
protected void FormView_Diary_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDown_DaysDuringMonth = FormView_Diary.FindControl("DropDownList_DaysDuringMonth") as DropDownList; e.Values["Daysduringmonth"] =Convert.ToInt32(DropDown_DaysDuringMonth.SelectedValue); ListBox ListBox_office = FormView_Diary.FindControl("ListBox_officename") as ListBox; int[] selectedIndices = ListBox_office.GetSelectedIndices(); e.Values["NoOfOfficeinspected"] = selectedIndices.Length; ViewState["SelectedItems"] = selectedIndices; }
protected void frmFollowupAction_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["CompanyId"] = Company.CompanyId; if (String.IsNullOrEmpty(e.Values["Probability"].ToString())) e.Values["Probability"] = Convert.ToDecimal("0"); else e.Values["Probability"] = Convert.ToDecimal(e.Values["Probability"]); }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { if (au != null) { e.Values.Add("ucrea", au.UserName); } //e.Values.Add("chkPersonaJuridica", true); }
protected void fvSaleRegister_ItemInserting(object sender, FormViewInsertEventArgs e) { Guid LicnceId = new Guid(ddlVendorId.SelectedValue); string Date = txtDate.Text; Date = Date + " " + ((DropDownList)fvSaleRegister.FindControl("ddlHours")).SelectedValue +":"+ ((DropDownList)fvSaleRegister.FindControl("ddlMinutes")).SelectedValue; DateTime DateNow = Convert.ToDateTime(Date); e.Values.Add("licenseId", LicnceId); e.Values.Add("Date",Date); Global.SetFormViewParameters(e.Values, LicenseApplication.GetSaleRow()); }
private void AddInsertParameterValues(FormViewInsertEventArgs e) { ISNet.WebUI.WebCombo.WebCombo paymentInfoWebCombo = fvPaymentInfoAudit.FindControl("wcPaymentInfo") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("PaymentInfoGuid", paymentInfoWebCombo.SelectedRow.Value); ISNet.WebUI.WebControls.WebInput paymentInfoIDWebInput = fvPaymentInfoAudit.FindControl("wiPaymentInfoID") as ISNet.WebUI.WebControls.WebInput; e.Values.Add("PaymentInfoID", paymentInfoIDWebInput.Text); }
private void AddInsertParameterValues(FormViewInsertEventArgs e) { ISNet.WebUI.WebCombo.WebCombo facilityWebCombo = fvClick.FindControl("wcFacility") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("FacilityGuid", facilityWebCombo.SelectedRow.Value); ISNet.WebUI.WebCombo.WebCombo listingTypeWebCombo = fvClick.FindControl("wcListingType") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("ListingTypeGuid", listingTypeWebCombo.SelectedRow.Value); }
private void AddInsertParameterValues(FormViewInsertEventArgs e) { ISNet.WebUI.WebCombo.WebCombo cityStateZipWebCombo = fvClient.FindControl("wcCityStateZip") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("CityStateZipGuid", cityStateZipWebCombo.SelectedRow.Value); ISNet.WebUI.WebCombo.WebCombo paymentInfoWebCombo = fvClient.FindControl("wcPaymentInfo") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("PaymentInfoGuid", paymentInfoWebCombo.SelectedRow.Value); }
protected void fvInternalHearing_ItemInserting(object sender, FormViewInsertEventArgs e) { Global.SetFormViewParameters(e.Values, VendorOffence.GetInvestigationRow()); if(((CheckBox)fvInternalHearing.FindControl("chkJudgement")).Checked) e.Values.Add("Remarks",((TextBox)fvInternalHearing.FindControl("txtRemarksIns")).Text ); else e.Values.Add("Remarks",null); e.Values.Add("InvestigationType","In"); }
protected void Unnamed1_ItemInserting(object sender, FormViewInsertEventArgs e) { FormView formView = (FormView)((ContentPlaceHolder)Master.FindControl("MainContent")).FindControl("AddFormView"); FileUpload c = (FileUpload)formView.FindControl("Attachment"); if (c.HasFile) { var outputPath = Server.MapPath("") + "\\files"; c.PostedFile.SaveAs(outputPath + "\\" + c.FileName); } }
protected void FormView_AppealRegister_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDownOffice = FormView_AppealRegister.FindControl("DropDownList_office") as DropDownList; e.Values["KacheriOffice"] = DropDownOffice.SelectedValue; DropDownList DropDownVersus = FormView_AppealRegister.FindControl("DropdownList_Versus") as DropDownList; e.Values["Versus"] = DropDownVersus.SelectedValue; RadioButtonList RadioButtonlist_continue = FormView_AppealRegister.FindControl("RadioButtonList_continue") as RadioButtonList; e.Values["Continue_remand"] = Convert.ToBoolean(RadioButtonlist_continue.SelectedValue); }
protected void frmServices_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["CompanyId"] = Company.CompanyId; e.Values["Price"] = Convert.ToDecimal(e.Values["Price"].ToString().RemoveMask()); e.Values["TimeInMinutes"] = Convert.ToInt32(e.Values["TimeInMinutes"].ToString().RemoveMask()); if (!String.IsNullOrEmpty(e.Values["ISS"].ToString())) e.Values["ISS"] = Convert.ToDecimal(e.Values["ISS"].ToString().RemoveMask()); else e.Values["ISS"] = null; }
protected void FormView_HighCourtReg_ItemInserting(object sender, FormViewInsertEventArgs e) { RadioButtonList Radio_parawisermrksent = FormView_HighCourtReg.FindControl("Radio_parawisermrksent") as RadioButtonList; e.Values["Parawiseremarks"] = Convert.ToBoolean(Radio_parawisermrksent.SelectedValue); RadioButtonList Radio_AffidavitSent = FormView_HighCourtReg.FindControl("Radio_affidavit") as RadioButtonList; e.Values["Affidavit"] = Convert.ToBoolean(Radio_AffidavitSent.SelectedValue); DropDownList dropdownofficename = FormView_HighCourtReg.FindControl("Drop_officename") as DropDownList; e.Values["DistrictOfficeName"] = dropdownofficename.SelectedValue; }
protected void FormViewCoberturasAplicables_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList ddlMoneda = FormViewCoberturasAplicables.FindControl("ddlMoneda") as DropDownList; if (ddlMoneda == null || ddlMoneda.SelectedValue == "-1") { e.Cancel = true; showMessage("Escoja una moneda por favor"); return; } e.Values["IdAjuste"] = Request.QueryString["IdAjuste"]; e.Values["MonedaSumaAsegurada"] = ddlMoneda.SelectedValue; }
protected void FormView_ACB_Case_Register_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList DropDown_EmployeeName = FormView_ACB_Case_Register.FindControl("DropDownList_EmployeeName") as DropDownList; e.Values["Employee_Name"] = DropDown_EmployeeName.SelectedValue; DropDownList DropDown_Designation = FormView_ACB_Case_Register.FindControl("DropDownList_Designation") as DropDownList; e.Values["Designation"] = DropDown_Designation.SelectedValue; RadioButtonList RadioList_HighCourt = FormView_ACB_Case_Register.FindControl("RadioButtonList_HighCourt") as RadioButtonList; e.Values["High_court_Appeal"] = Convert.ToBoolean(RadioList_HighCourt.SelectedValue); RadioButtonList RadioList_SupremeCourt = FormView_ACB_Case_Register.FindControl("RadioButtonList_SupremeCourt") as RadioButtonList; e.Values["Supreme_Court_Appeal"] = Convert.ToBoolean(RadioList_SupremeCourt.SelectedValue); }
private void AddInsertParameterValues(FormViewInsertEventArgs e) { ISNet.WebUI.WebCombo.WebCombo cityStateZipWebCombo = fvFacility.FindControl("wcCityStateZip") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("CityStateZipGuid", cityStateZipWebCombo.SelectedRow.Value); ISNet.WebUI.WebCombo.WebCombo clientWebCombo = fvFacility.FindControl("wcClient") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("ClientGuid", clientWebCombo.SelectedRow.Value); ISNet.WebUI.WebCombo.WebCombo listingTypeWebCombo = fvFacility.FindControl("wcListingType") as ISNet.WebUI.WebCombo.WebCombo; e.Values.Add("ListingTypeGuid", listingTypeWebCombo.SelectedRow.Value); }
protected void FormView_Roster_ItemInserting(object sender, FormViewInsertEventArgs e) { ListBox ListBox_Designation = FormView_Roster.FindControl("ListBox_Designation") as ListBox; e.Values["Deatils_Of_Designation"] = ListBox_Designation.SelectedValue; DropDownList DropDown_AnamatType = FormView_Roster.FindControl("DropDownList_AnamatType") as DropDownList; e.Values["Anamat_Type"] = DropDown_AnamatType.SelectedValue; DropDownList DropDown_ReservedCategory = FormView_Roster.FindControl("DropDownList_ReservedCategory") as DropDownList; e.Values["Reserved_For_Category"] = DropDown_ReservedCategory.SelectedValue; DropDownList DropDown_EmployeeName = FormView_Roster.FindControl("DropDownList_EmployeeName") as DropDownList; e.Values["Employee_Name"] = DropDown_EmployeeName.SelectedValue; }
protected void FormView_Departmental_Inquiry_Register_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList dropdown_employeename = FormView_Departmental_Inquiry_Register.FindControl("DropDownList_employeename") as DropDownList; e.Values["Name_Of_Employee"] = dropdown_employeename.SelectedValue; DropDownList DropDown_Grade = FormView_Departmental_Inquiry_Register.FindControl("DropDownList_Grade") as DropDownList; e.Values["Grade"] = DropDown_Grade.SelectedValue; DropDownList DropDown_InquiryOfficer = FormView_Departmental_Inquiry_Register.FindControl("DropDownList_InquiryOfficer") as DropDownList; e.Values["Name_Of_Inquiry_Officer"] = DropDown_InquiryOfficer.SelectedValue; RadioButtonList RadioList_Govt_Dept = FormView_Departmental_Inquiry_Register.FindControl("RadioButtonList_Govt_Dept") as RadioButtonList; e.Values["Government_Department"] = RadioList_Govt_Dept.SelectedValue; }
protected void FormView_PIO_ItemInserting(object sender, FormViewInsertEventArgs e) { RadioButtonList Radio_BPL = FormView_PIO.FindControl("Radio_applbpl") as RadioButtonList; e.Values["Appl_BPL"] = Convert.ToBoolean(Radio_BPL.SelectedValue); RadioButtonList Radio_information = FormView_PIO.FindControl("Radio_information") as RadioButtonList; e.Values["Information"] = Radio_information.SelectedValue; DropDownList Drop_FeeMode = FormView_PIO.FindControl("Drop_recvdfessmode") as DropDownList; e.Values["Recvd_Fees_Mode"] = Drop_FeeMode.SelectedValue; RadioButtonList Radio_InfoSend = FormView_PIO.FindControl("Radio_informationsend") as RadioButtonList ; e.Values["Info_Send"] = Convert.ToBoolean(Radio_InfoSend.SelectedValue); }
protected void OneRoleForm_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Cancel = true; if (this.OneRoleForm.CurrentMode == FormViewMode.Insert) { TextBox RoleName = (TextBox)this.OneRoleForm.FindControl("RoleNameTextBox"); if (RoleName != null) { if (Enidc.Web.Business.Role.CreateRole(RoleName.Text.Trim())) { this.Roles_ODTS.DataBind(); this.RolesList.DataBind(); this.OneRoleForm.ChangeMode(FormViewMode.ReadOnly); } } } }
protected void fv_ItemInserting(object sender, FormViewInsertEventArgs e) { int?i = null; int iCode = 0; DropDownList ddlYear = fv.FindControl("ddlYear") as DropDownList; DropDownList ddlSource = fv.FindControl("ddlSource") as DropDownList; TextBox tbAmt = fv.FindControl("tbAmt") as TextBox; StringBuilder sb = new StringBuilder(); using (WACDataClassesDataContext wac = new WACDataClassesDataContext()) { try { short?shYear = null; if (!string.IsNullOrEmpty(ddlYear.SelectedValue)) { shYear = Convert.ToInt16(ddlYear.SelectedValue); } else { sb.Append("Year is required. "); } string sSource = null; if (!string.IsNullOrEmpty(ddlSource.SelectedValue)) { sSource = ddlSource.SelectedValue; } else { sb.Append("Source is required. "); } decimal?dAmt = null; if (!string.IsNullOrEmpty(tbAmt.Text)) { try { dAmt = Convert.ToDecimal(tbAmt.Text); } catch { sb.Append("Amount must be a number (Decimal). "); } } else { sb.Append("Amount is required. "); } if (string.IsNullOrEmpty(sb.ToString())) { iCode = wac.agWorkloadFunding_add(shYear, sSource, dAmt, Session["userName"].ToString(), ref i); if (iCode == 0) { fv.ChangeMode(FormViewMode.ReadOnly); BindWorkloadFunding(Convert.ToInt32(i)); } else { WACAlert.Show("Error Returned from Database.", iCode); } } else { sb.Insert(0, "The Insert Failed: "); WACAlert.Show(sb.ToString(), 0); } } catch (Exception ex) { WACAlert.Show(ex.Message, 0); } } }
//protected void btnAddHighCourtdetails_Click(object sender, EventArgs e) //{ // mvInspectionDetails.SetActiveView(mvInspectionDetails.Views[2]); // fvHighCourtdetails.ChangeMode(FormViewMode.Insert); //} protected void fvHighCourtdetails_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values.Add("VendorOffenceId", gvEVendorOffenceDetails.SelectedDataKey.Value); }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { DropDownList myddPOR_01 = (DropDownList)FormView1.FindControl("ddPOR01"); //Porduction Site DropDownList myddPOR_02 = (DropDownList)FormView1.FindControl("ddPOR02"); //PKG TextBox myPOR_03 = (TextBox)FormView1.FindControl("text_POR03"); //WaferTech //TextBox myPOR_04 = (TextBox)FormView1.FindControl("text_POR04"); DropDownList myddPOR_04 = (DropDownList)FormView1.FindControl("ddPOR04"); //FAB //TextBox myPOR_05 = (TextBox)FormView1.FindControl("text_POR05"); DropDownList myddPOR_05 = (DropDownList)FormView1.FindControl("ddPOR05"); //WaferPSVTypeThickness TextBox myPOR_06 = (TextBox)FormView1.FindControl("text_POR06"); //PRType DropDownList myddPOR_07 = (DropDownList)FormView1.FindControl("ddPOR07"); //TietchingChemical DropDownList myddPOR_08 = (DropDownList)FormView1.FindControl("ddPOR08"); //TinShellBake DropDownList myddPOR_09 = (DropDownList)FormView1.FindControl("ddPOR09"); //PIRougness DropDownList myddPOR_10 = (DropDownList)FormView1.FindControl("ddPOR10"); //BumpResistanceCapability DropDownList myddPOR_11 = (DropDownList)FormView1.FindControl("ddPOR11"); //推大球 DropDownList myddPOR_12 = (DropDownList)FormView1.FindControl("ddPOR12"); //LowK DropDownList myddPOR_13 = (DropDownList)FormView1.FindControl("ddPOR13"); //PRThickness DropDownList myddPOR_14 = (DropDownList)FormView1.FindControl("ddPOR14"); //Customer //------------POR_15 For Pord--------------------------- Label mylab_Pord = (Label)FormView1.FindControl("lab_Pord"); DropDownList myddPord = (DropDownList)FormView1.FindControl("ddPord"); TextBox mytext_No = (TextBox)FormView1.FindControl("text_No"); string myPOR_15 = mylab_Pord.Text + "-" + myddPord.SelectedValue.ToString() + "-" + mytext_No.Text; //------------For Pord End----------------------- DropDownList myddPOR_16 = (DropDownList)FormView1.FindControl("ddPOR16"); //UBMTypeThickness TextBox myPOR_17 = (TextBox)FormView1.FindControl("text_POR17"); //Device Label myPOR_18 = (Label)FormView1.FindControl("labPOR18"); TextBox myPOR_19 = (TextBox)FormView1.FindControl("text_POR19"); DropDownList myddPOR_20 = (DropDownList)FormView1.FindControl("ddPOR20"); DropDownList myddPOR_21 = (DropDownList)FormView1.FindControl("ddPOR21"); TextBox myPOR_22 = (TextBox)FormView1.FindControl("text_POR22"); DropDownList myddPOR_23 = (DropDownList)FormView1.FindControl("ddPOR23"); DropDownList myddPOR_24 = (DropDownList)FormView1.FindControl("ddPOR24"); DropDownList myddPOR_25 = (DropDownList)FormView1.FindControl("ddPOR25"); DropDownList myddPOR_26 = (DropDownList)FormView1.FindControl("ddPOR26"); TextBox myPOR_27 = (TextBox)FormView1.FindControl("text_POR27"); DropDownList myddPOR_28 = (DropDownList)FormView1.FindControl("ddPOR28"); TextBox myPOR_29 = (TextBox)FormView1.FindControl("text_POR29"); TextBox myPOR_30 = (TextBox)FormView1.FindControl("text_POR30"); TextBox myPOR_31 = (TextBox)FormView1.FindControl("text_POR31"); TextBox myPOR_32 = (TextBox)FormView1.FindControl("text_POR32"); DropDownList myddPOR_33 = (DropDownList)FormView1.FindControl("ddPOR33"); TextBox myPOR_34 = (TextBox)FormView1.FindControl("text_POR34"); TextBox myPOR_35 = (TextBox)FormView1.FindControl("text_POR35"); TextBox myPOR_36 = (TextBox)FormView1.FindControl("text_POR36"); TextBox myPOR_37 = (TextBox)FormView1.FindControl("text_POR37"); //POR38,POR39,POR40,POR41 Default Text = "NA"----------------------------------------------- TextBox myPOR_38 = (TextBox)FormView1.FindControl("text_POR38"); myPOR_38.Text = "NA"; TextBox myPOR_39 = (TextBox)FormView1.FindControl("text_POR39"); myPOR_39.Text = "NA"; TextBox myPOR_40 = (TextBox)FormView1.FindControl("text_POR40"); myPOR_40.Text = "NA"; TextBox myPOR_41 = (TextBox)FormView1.FindControl("text_POR41"); myPOR_41.Text = "NA"; //------------------------------------------------------------------ TextBox myPOR_42 = (TextBox)FormView1.FindControl("text_POR42"); TextBox myPOR_43 = (TextBox)FormView1.FindControl("text_POR43"); TextBox myPOR_44 = (TextBox)FormView1.FindControl("text_POR44"); TextBox myPOR_45 = (TextBox)FormView1.FindControl("text_POR45"); DropDownList myddPOR_46 = (DropDownList)FormView1.FindControl("ddPOR46"); TextBox myPOR_47 = (TextBox)FormView1.FindControl("text_POR47"); Label myPOR_48 = (Label)FormView1.FindControl("labPOR48"); //套公式: POR19-POR45 Label myPOR_49 = (Label)FormView1.FindControl("labPOR49"); //套公式: POR29/POR36 Label myPOR_50 = (Label)FormView1.FindControl("labPOR50"); //套公式: (Math.PI * (POR29 * POR29/4) * POR53) / (POR51 * POR52) * 1000000 TextBox myPOR_51 = (TextBox)FormView1.FindControl("text_POR51"); TextBox myPOR_52 = (TextBox)FormView1.FindControl("text_POR52"); TextBox myPOR_53 = (TextBox)FormView1.FindControl("text_POR53"); TextBox myPOR_54 = (TextBox)FormView1.FindControl("text_POR54"); TextBox myPOR_55 = (TextBox)FormView1.FindControl("text_POR55"); clsMySQL db = new clsMySQL(); DataSet ds; if (myddPOR_14.SelectedValue.ToString() == "") { RegisterStartupScript("訊息通知", "<script> alert('必須填寫POR Customer!!');</script>"); } else { if (myPOR_17.Text == "") { RegisterStartupScript("訊息通知", "<script> alert('必須填寫POR Device!!');</script>"); } else { if (myddPOR_01.SelectedValue.ToString() == "") { RegisterStartupScript("訊息通知", "<script> alert('必須填寫Production Site!!');</script>"); } else { string strSQL_Query = "select * from npipor where POR_Customer = '" + myddPOR_14.SelectedValue.ToString() + "' and POR_Device = '" + myPOR_17.Text + "' and POR_01 = '" + myddPOR_01.SelectedValue.ToString() + "'"; ds = db.QueryDataSet(strSQL_Query); try { string strSQL_Insert = string.Format("Insert into npiPor " + "(POR_Customer, POR_Device, Stype, UpdateTime, npiUser, POR_Status," + "POR_01, POR_02, POR_03, POR_04, POR_05, POR_06, POR_07, POR_08, POR_09, POR_10," + "POR_11, POR_12, POR_13, POR_14, POR_15, POR_16, POR_17, POR_18, POR_19, POR_20, POR_21, POR_22," + "POR_23, POR_24, POR_25, POR_26, POR_27, POR_28, POR_29, POR_30, POR_31, POR_32, POR_33, POR_34," + "POR_35, POR_36, POR_37, POR_38, POR_39, POR_40, POR_41, POR_42, POR_43, POR_44, POR_45, POR_46," + "POR_47, POR_48, POR_49, POR_50, POR_51, POR_52, POR_53, POR_54, POR_55)values " + "('{13}','{16}','POR',NOW(),'','Y','{0}','{1}','{2}','{3}','{4}'," + "'{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}'," + "'{22}','{23}','{24}','{25}','{26}','{27}','{28}','{29}','{30}','{31}','{32}','{33}','{34}','{35}','{36}','{37}'," + "'{38}','{39}','{40}','{41}','{42}','{43}','{44}','{45}','{46}','{47}','{48}','{49}','{50}','{51}','{52}','{53}'," + "'{54}')", myddPOR_01.SelectedValue.ToString().Trim(), myddPOR_02.SelectedValue.ToString().Trim(), myPOR_03.Text.Trim(), myddPOR_04.SelectedValue.ToString().Trim(), myddPOR_05.SelectedValue.ToString().Trim(), myPOR_06.Text.Trim(), myddPOR_07.SelectedValue.ToString().Trim(), myddPOR_08.SelectedValue.ToString().Trim(), myddPOR_09.SelectedValue.ToString().Trim(), myddPOR_10.SelectedValue.ToString().Trim(), myddPOR_11.SelectedValue.ToString().Trim(), myddPOR_12.SelectedValue.ToString().Trim(), myddPOR_13.SelectedValue.ToString().Trim(), myddPOR_14.SelectedValue.ToString().Trim(), myPOR_15.Trim(), myddPOR_16.SelectedValue.ToString().Trim(), myPOR_17.Text.Trim(), myPOR_18.Text.Trim(), myPOR_19.Text.Trim(), myddPOR_20.SelectedValue.ToString().Trim(), myddPOR_21.SelectedValue.ToString().Trim(), myPOR_22.Text.Trim(), myddPOR_23.SelectedValue.ToString().Trim(), myddPOR_24.SelectedValue.ToString().Trim(), myddPOR_25.SelectedValue.ToString().Trim(), myddPOR_26.SelectedValue.ToString().Trim(), myPOR_27.Text.Trim(), myddPOR_28.SelectedValue.ToString().Trim(), myPOR_29.Text.Trim(), myPOR_30.Text.Trim(), myPOR_31.Text.Trim(), myPOR_32.Text.Trim(), myddPOR_33.SelectedValue.ToString().Trim(), myPOR_34.Text.Trim(), myPOR_35.Text.Trim(), myPOR_36.Text.Trim(), myPOR_37.Text.Trim(), myPOR_38.Text.Trim(), myPOR_39.Text.Trim(), myPOR_40.Text.Trim(), myPOR_41.Text.Trim(), myPOR_42.Text.Trim(), myPOR_43.Text.Trim(), myPOR_44.Text.Trim(), myPOR_45.Text.Trim(), myddPOR_46.SelectedValue.ToString().Trim(), myPOR_47.Text.Trim(), myPOR_48.Text.Trim(), myPOR_49.Text.Trim(), myPOR_50.Text.Trim(), myPOR_51.Text.Trim(), myPOR_52.Text.Trim(), myPOR_53.Text.Trim(), myPOR_54.Text.Trim(), myPOR_55.Text.Trim()); //lblError.Text = strSQL_Insert; if (db.QueryExecuteNonQuery(strSQL_Insert)) { RegisterStartupScript("訊息通知", "<script> alert('POR資料新增,成功!!');</script>"); ClearTextBox(); ChangeViewMode(); } else { //lblError.Text = strSQL_Insert; RegisterStartupScript("訊息通知", "<script> alert('POR資料新增,失敗!!');</script>"); } } catch (Exception ex) { ClearTextBox(); lblError.Text = "[POR Insert Error Message]:" + ex.ToString(); } } } } }
protected void frv_pdhs_ItemInserting(object sender, FormViewInsertEventArgs e) { sds_program.InsertParameters["p_date"].DefaultValue = DateTime.Today.ToString("dd-MM-yyyy"); sds_program.InsertParameters["p_active"].DefaultValue = "1"; }
protected void fvMemo_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values.Add("InspectionId", fldInspectionId.Value); Global.SetFormViewParameters(e.Values, Inspection.GetInspectionMemoRow()); }
protected void FvDocumentMaster_ItemInserting(object sender, FormViewInsertEventArgs e) { Global.SetFormViewParameters(e.Values, AdjudicationRequest.GetDocumentMasterRow()); }
protected void fvHighCourtJudgement_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values.Add("AppealApplicationId", (Guid)fvHighCourtDetails.SelectedValue); }
protected void fvAppealHearing_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values.Add("AppealApplicationId", (Guid)gvAppealHearing.SelectedDataKey.Value); }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { //psjl.InsertParameters["领取用户id"] = 1; }
protected void fvParticipant_Communication_ItemInserting(object sender, FormViewInsertEventArgs e) { int?i = null; int iCode = 0; DropDownList ddlType = fvParticipant_Communication.FindControl("ddlType") as DropDownList; DropDownList ddlUsage = fvParticipant_Communication.FindControl("ddlUsage") as DropDownList; //DropDownList ddlPhone = fvParticipant_Communication.FindControl("UC_Communication_EditInsert_Phone").FindControl("ddlNumber") as DropDownList; TextBox tbAreaCode = fvParticipant_Communication.FindControl("tbAreaCode") as TextBox; TextBox tbPhoneNumber = fvParticipant_Communication.FindControl("tbPhoneNumber") as TextBox; StringBuilder sb = new StringBuilder(); using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext()) { try { string sType = null; if (!string.IsNullOrEmpty(ddlType.SelectedValue)) { sType = ddlType.SelectedValue; } else { sb.Append("Type is required. "); } string sUsage = null; if (!string.IsNullOrEmpty(ddlUsage.SelectedValue)) { sUsage = ddlUsage.SelectedValue; } else { sb.Append("Usage is required. "); } //int? iPhoneNumber = null; //if (!string.IsNullOrEmpty(ddlPhone.SelectedValue)) iPhoneNumber = Convert.ToInt32(ddlPhone.SelectedValue); //else sb.Append("Phone Number is required. "); string sAreaCode = null; if (!string.IsNullOrEmpty(tbAreaCode.Text)) { sAreaCode = tbAreaCode.Text; } else { sb.Append("Area Code is required. "); } string sPhoneNumber = null; if (!string.IsNullOrEmpty(tbPhoneNumber.Text)) { sPhoneNumber = tbPhoneNumber.Text; } else { sb.Append("Phone Number is required. "); } if (string.IsNullOrEmpty(sb.ToString())) { iCode = wDataContext.participantCommunication_add_express(Convert.ToInt32(hfPK_Participant.Value), sAreaCode, sPhoneNumber, sType, sUsage, Session["userName"].ToString(), ref i); if (iCode == 0) { fvParticipant_Communication.ChangeMode(FormViewMode.ReadOnly); Participant_Communication_BindRecord(Convert.ToInt32(i)); } else { WACAlert.Show("Error Returned from Database.", iCode); } } else { WACAlert.Show(sb.ToString(), 0); } } catch (Exception ex) { WACAlert.Show("Error: " + ex.Message, 0); } } }
protected void fvHighCourtDetails_ItemInserting(object sender, FormViewInsertEventArgs e) { Global.SetFormViewParameters(e.Values, AppealApplication.GetRow()); e.Values.Add("AppealApplicationId", (Guid)gvAppealHearing.SelectedDataKey.Value); }
protected void fvCity_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["ProvId"] = gvProvince.SelectedValue; }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { int z = 1; // DbParameter param }
protected void AccountFormView_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["Status"] = "0"; }
/// <summary> /// Handles the ItemInserting event of the MappingFormView control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:System.Web.UI.WebControls.FormViewInsertEventArgs"/> instance containing the event data.</param> protected void MappingFormView_ItemInserting(object sender, FormViewInsertEventArgs e) { AddValues(e.Values); }
protected void FormViewDetencion_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["NroDetencion"] = getNewDetencion().ToString(); e.Values["FechaGrabacion"] = DateTime.Today.ToString(); e.Values["Usuario"] = BitOP.Global.Usuario; }
protected void viewviewSignature_ItemInserting(object sender, FormViewInsertEventArgs e) { }
protected void FvDriverView_ItemInserting(object sender, FormViewInsertEventArgs e) { FvDriverView_CallInsertOrUpdate("Insert"); }
protected void FvInspectionCheckListMaster_ItemInserting(object sender, FormViewInsertEventArgs e) { Global.SetFormViewParameters(e.Values, Inspection.GetInspectionCheckListMasterRow()); }
protected void fvBTBInward_ItemInserting(object sender, FormViewInsertEventArgs e) { //Srtting the FormView Parameter. Global.SetFormViewParameters(e.Values, InwardOutward.GetRow()); }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["SystemCode"] = "GKFC-ZY-630202"; }
protected void fvHR_WACEmployee_Evaluation_ItemInserting(object sender, FormViewInsertEventArgs e) { int?pk = null; int iCode = 0; TextBox tbDate = fvHR_WACEmployee_Evaluation.FindControl("AjaxCalendar_Date").FindControl("tb") as TextBox; TextBox tbFollowUpDate = fvHR_WACEmployee_Evaluation.FindControl("AjaxCalendar_FollowUpDate").FindControl("tb") as TextBox; TextBox tbRating = fvHR_WACEmployee_Evaluation.FindControl("tbRating") as TextBox; DropDownList ddlSixMonthEval = fvHR_WACEmployee_Evaluation.FindControl("ddlSixMonthEval") as DropDownList; DropDownList ddlAnnualEval = fvHR_WACEmployee_Evaluation.FindControl("ddlAnnualEval") as DropDownList; DropDownList ddlFiscalYear = fvHR_WACEmployee_Evaluation.FindControl("ddlFiscalYear") as DropDownList; DropDownList ddlPosition = fvHR_WACEmployee_Evaluation.FindControl("ddlPosition") as DropDownList; DropDownList ddlJobDescription = fvHR_WACEmployee_Evaluation.FindControl("ddlJobDescription") as DropDownList; TextBox tbNote = fvHR_WACEmployee_Evaluation.FindControl("tbNote") as TextBox; TextBox tbFollowUpNote = fvHR_WACEmployee_Evaluation.FindControl("tbFollowUpNote") as TextBox; using (WACDataClassesDataContext wac = new WACDataClassesDataContext()) { try { DateTime?dtDate = null; try { dtDate = Convert.ToDateTime(tbDate.Text); } catch { throw new Exception("Evaluation Date missing or Invalid "); } DateTime?dtFollowUpDate = null; try { dtFollowUpDate = Convert.ToDateTime(tbFollowUpDate.Text); } catch {} int?iRating = SafeIntFromText(tbRating.Text); string sSixMonthEval = null; if (!string.IsNullOrEmpty(ddlSixMonthEval.SelectedValue)) { sSixMonthEval = ddlSixMonthEval.SelectedValue; } string sAnnualEval = null; if (!string.IsNullOrEmpty(ddlAnnualEval.SelectedValue)) { sAnnualEval = ddlAnnualEval.SelectedValue; } string sFK_positionWAC = null; if (!string.IsNullOrEmpty(ddlPosition.SelectedValue)) { sFK_positionWAC = ddlPosition.SelectedValue; } else { throw new Exception("Position is required. "); } string sFK_fiscalYear = null; if (!string.IsNullOrEmpty(ddlFiscalYear.SelectedValue)) { sFK_fiscalYear = ddlFiscalYear.SelectedValue; } else { throw new Exception("Fiscal Year is required. "); } string sJobDescription = null; if (!string.IsNullOrEmpty(ddlJobDescription.SelectedValue)) { sJobDescription = ddlJobDescription.SelectedValue; } string sNote = null; if (!string.IsNullOrEmpty(tbNote.Text)) { sNote = tbNote.Text; } string sFollowUpNote = null; if (!string.IsNullOrEmpty(tbFollowUpNote.Text)) { sFollowUpNote = tbFollowUpNote.Text; } iCode = wac.participantWAC_evaluation_add(FK_ParticipantWAC, sFK_fiscalYear, sFK_positionWAC, dtDate, iRating, sSixMonthEval, sAnnualEval, dtFollowUpDate, sFollowUpNote, sNote, sJobDescription, Session["userName"].ToString(), ref pk); if (iCode == 0) { fvHR_WACEmployee_Evaluation.ChangeMode(FormViewMode.ReadOnly); PK_ParticipantEval = Convert.ToInt32(pk); BindHR_WACEmployee_Evaluation(); OnFormActionCompleted(this, new FormViewEventArgs(FK_ParticipantWAC, "evaluation")); } else { WACAlert.Show("Error Returned from Database.", iCode); } } catch (Exception ex) { WACAlert.Show("Error: " + ex.Message, 0); } } }
protected void fvPostalStampDenom_ItemInserting(object sender, FormViewInsertEventArgs e) { ////Global.SetFormViewParameters(e.Values, InwardOutward.GetPostalStampRow()); }
protected void ctlAnnouncementGroupForm_ItemInserting(object sender, FormViewInsertEventArgs e) { SuAnnouncementGroup announcementGroup = new SuAnnouncementGroup(); HttpPostedFile imageFile; GetSuAnnouncementGroupInfo(announcementGroup, out imageFile); SuAnnouncementGroupLang announcementGroupLang = new SuAnnouncementGroupLang(); TextBox ctlTxtName = ctlAnnouncementGroupForm.FindControl("ctlTxtName") as TextBox; short languageId = UserAccount.CurrentLanguageID; announcementGroupLang.Language = DbLanguageService.FindByIdentity(languageId); announcementGroupLang.AnnouncementGroup = announcementGroup; announcementGroupLang.AnnouncementGroupName = ctlTxtName.Text; announcementGroupLang.Active = announcementGroup.Active; announcementGroupLang.CreBy = 0; announcementGroupLang.CreDate = DateTime.Now; announcementGroupLang.UpdPgm = ProgramCode; announcementGroupLang.UpdBy = 0; announcementGroupLang.UpdDate = DateTime.Now; try { if (imageFile == null) { SuAnnouncementGroupService.AddAnnouncementGroup(announcementGroup, announcementGroupLang); } else { // If imageFile is not null. short newAnnouncementGroupId = SuAnnouncementGroupService.AddAnnouncementGroup(announcementGroup, announcementGroupLang, imageFile); // Get file path from Database DbParameter. // Save new file to stored directory. //string filePath = "D:\\DotNetStandard\\main\\program\\NHibernate\\SCG.eAccounting.Web\\ImageFiles\\Announcement\\"; string filePath = ParameterServices.AnnouncementGoupUploadFilePath; filePath = AppDomain.CurrentDomain.BaseDirectory + filePath.Replace("~", string.Empty).Replace("/", "\\"); if (Directory.Exists(filePath)) { // imagePath contain FileName of each AnnouncementGroup. imageFile.SaveAs(filePath + announcementGroup.ImagePath); } else { Directory.CreateDirectory(filePath); imageFile.SaveAs(filePath + announcementGroup.ImagePath); } } } catch (ServiceValidationException ex) { ValidationErrors.MergeErrors(ex.ValidationErrors); } // Check if no validation error then changemode to default mode. if (ValidationErrors.IsEmpty) { ctlAnnouncementGroupForm.ChangeMode(FormViewMode.ReadOnly); ClosePopUp(); ctlAnnouncementGroupGrid.DataCountAndBind(); } }
protected void frmAbyari_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["SahmeDolat"] = tkv.Utility.CurrencyHelpers.GetValidCurrency(e.Values["SahmeDolat"]); e.Values["SahmeBank"] = tkv.Utility.CurrencyHelpers.GetValidCurrency(e.Values["SahmeBank"]); e.Values["SahmeMotaghazi"] = tkv.Utility.CurrencyHelpers.GetValidCurrency(e.Values["SahmeMotaghazi"]); }
protected void fvCommunication_PhoneNumber_ItemInserting(object sender, FormViewInsertEventArgs e) { int?i = null; int iCode = 0; TextBox tbAreaCode = fvCommunication_PhoneNumber.FindControl("tbAreaCode") as TextBox; TextBox tbPhoneNumber = fvCommunication_PhoneNumber.FindControl("tbPhoneNumber") as TextBox; StringBuilder sb = new StringBuilder(); using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext()) { try { string sAreaCode = null; if (!string.IsNullOrEmpty(tbAreaCode.Text)) { sAreaCode = WACGlobal_Methods.Format_Global_PhoneNumber_StripToNumbers(tbAreaCode.Text, WACGlobal_Methods.Enum_Number_Type.AREACODE); } else { sb.Append("Area Code is required. "); } if (string.IsNullOrEmpty(sAreaCode)) { sb.Append("Area Code not in correct format. "); } string sPhoneNumber = null; if (!string.IsNullOrEmpty(tbPhoneNumber.Text)) { sPhoneNumber = WACGlobal_Methods.Format_Global_PhoneNumber_StripToNumbers(tbPhoneNumber.Text, WACGlobal_Methods.Enum_Number_Type.PHONENUMBER); } else { sb.Append("Phone Number is required. "); } if (string.IsNullOrEmpty(sPhoneNumber)) { sb.Append("Phone Number not in correct format. "); } if (string.IsNullOrEmpty(sb.ToString())) { iCode = wDataContext.communication_add(sAreaCode, sPhoneNumber, Session["userName"].ToString(), ref i); if (iCode == 0) { fvCommunication_PhoneNumber.ChangeMode(FormViewMode.ReadOnly); BindCommunication_PhoneNumber(Convert.ToInt32(i)); } else { WACAlert.Show("Error Returned from Database.", iCode); } } else { WACAlert.Show(sb.ToString(), 0); } } catch (Exception ex) { WACAlert.Show("Error: " + ex.Message, 0); } } }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { FillingData fd; fd.strData = ""; fd.strError = ""; fd = FillDataCheck(); string strScript = ""; TextBox myNew_Customer = (TextBox)FormView1.FindControl("text_Customer"); //Customer TextBox myNew_Device = (TextBox)FormView1.FindControl("text_Device"); //Device TextBox myMan_01 = (TextBox)FormView1.FindControl("text_Man01"); //Wafer PSV Type/Thickness TextBox myMan_02 = (TextBox)FormView1.FindControl("text_Man02"); //PI Type TextBox myMan_03 = (TextBox)FormView1.FindControl("text_Man03"); //PI Thickness DropDownList myMan_04 = (DropDownList)FormView1.FindControl("DDL_Man04"); //UBM Type/Thickness TextBox myMan_05 = (TextBox)FormView1.FindControl("text_Man05"); //PR Thickness TextBox myMan_06 = (TextBox)FormView1.FindControl("text_Man06"); //UBM Insdie Final Maetal for FOC TextBox myMan_07 = (TextBox)FormView1.FindControl("text_Man07"); //UBM Plating Area(dm2) TextBox myMan_08 = (TextBox)FormView1.FindControl("text_Man08"); //UBM Density(UBM Area/Die Area) TextBox myMan_09 = (TextBox)FormView1.FindControl("text_Man09"); //Mushroom CD TextBox myMan_10 = (TextBox)FormView1.FindControl("text_Man10"); //Min Mushroom Space TextBox myMan_11 = (TextBox)FormView1.FindControl("text_Man11"); //Bump Density(Bump Q'ty/Die Area) TextBox myMan_12 = (TextBox)FormView1.FindControl("text_Man12"); //BM/UBM Ratio TextBox myMan_13 = (TextBox)FormView1.FindControl("text_Man13"); //Bump Coplanarity DropDownList myMan_14 = (DropDownList)FormView1.FindControl("DDL_Man14"); //Bump Shear Strenght TextBox myMan_15 = (TextBox)FormView1.FindControl("text_Man15"); //Bump Void TextBox myMan_16 = (TextBox)FormView1.FindControl("text_Man16"); //PI Rougness(Ra) TextBox myMan_17 = (TextBox)FormView1.FindControl("text_Man17"); //August - Gross Die TextBox myMan_18 = (TextBox)FormView1.FindControl("text_Man18"); //August - Expose Pad TextBox myMan_19 = (TextBox)FormView1.FindControl("text_Man19"); //RVSI - Gross Die TextBox myMan_20 = (TextBox)FormView1.FindControl("text_Man20"); //Bump To Bump Space TextBox myMan_21 = (TextBox)FormView1.FindControl("text_Man21"); //SMO TextBox myMan_22 = (TextBox)FormView1.FindControl("text_Man22"); //UBM/SMO Ratio if (!fd.strError.Equals("")) { strScript = "<script language='javascript'>alert('" + fd.strError + "?');</script>"; Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", strScript); } else { string strData = myNew_Customer.Text.Trim() + "|" + myNew_Device.Text.Trim() + "|" + myMan_01.Text.Trim() + "|" + myMan_02.Text.Trim() + "|" + myMan_03.Text.Trim() + "|" + myMan_04.SelectedValue + "|" + myMan_05.Text.Trim() + "|" + myMan_06.Text.Trim() + "|" + myMan_07.Text.Trim() + "|" + myMan_08.Text.Trim() + "|" + myMan_09.Text.Trim() + "|" + myMan_10.Text.Trim() + "|" + myMan_11.Text.Trim() + "|" + myMan_12.Text.Trim() + "|" + myMan_13.Text.Trim() + "|" + myMan_14.SelectedValue + "|" + myMan_15.Text.Trim() + "|" + myMan_16.Text.Trim() + "|" + myMan_17.Text.Trim() + "|" + myMan_18.Text.Trim() + "|" + myMan_19.Text.Trim() + "|" + myMan_20.Text.Trim() + "|" + myMan_21.Text.Trim() + "|" + myMan_22.Text.Trim() + "|" + username.Trim(); strScript = string.Format("<script language='javascript'>ConfirmInsertManual('確定新增?','" + strData + "');</script>", myNew_Customer); Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", strScript); } //clsMySQL db = new clsMySQL(); //DataSet ds; //if (myNew_Customer.Text == "") //{ // RegisterStartupScript("訊息通知", "<script> alert('必須填寫New Customer!!');</script>"); //} //else //{ // if (myNew_Device.Text == "") // { // RegisterStartupScript("訊息通知", "<script> alert('必須填寫New Device!!');</script>"); // } // else // { // string strSQL_Query = "select * from npiManual where New_Customer = '" + myNew_Customer.Text + "' and New_Device = '" + myNew_Device.Text + "'"; // ds = db.QueryDataSet(strSQL_Query); // if (ds.Tables[0].Rows.Count > 0) // { // RegisterStartupScript("訊息通知", "<script> alert('Customer = [" + myNew_Customer.Text + "]/ Device = [" + myNew_Device.Text + "]的資料已存在!!');</script>"); // } // else // { // try // { //string strSQL_Insert = string.Format("Insert into npiManual " + // "(New_Customer, New_Device, Stype, UpdateTime, npiUser, Man_Status," + // "Man_01, Man_02, Man_03, Man_04, Man_05, Man_06, Man_07, Man_08, Man_09, Man_10," + // "Man_11, Man_12, Man_13, Man_14, Man_15, Man_16, Man_17, Man_18, Man_19, Man_20, Man_21, Man_22" + // ") values " + // "('{0}','{1}','Man',NOW(),'{24}','Y','{2}','{3}','{4}'," + // "'{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}'," + // "'{22}','{23}')", // myNew_Customer.Text.Trim(), myNew_Device.Text.Trim(), myMan_01.Text.Trim(), myMan_02.Text.Trim(), myMan_03.Text.Trim(), // myMan_04.Text.Trim(), myMan_05.Text.Trim(), myMan_06.Text.Trim(), myMan_07.Text.Trim(), myMan_08.Text.Trim(), // myMan_09.Text.Trim(), myMan_10.Text.Trim(), myMan_11.Text.Trim(), myMan_12.Text.Trim(), myMan_13.Text.Trim(), // myMan_14.Text.Trim(), myMan_15.Text.Trim(), myMan_16.Text.Trim(), myMan_17.Text.Trim(), myMan_18.Text.Trim(), // myMan_19.Text.Trim(), myMan_20.Text.Trim(), myMan_21.Text.Trim(), myMan_22.Text.Trim(), username.Trim()); //strSQL_Insert = strSQL_Insert.Replace("'", "''"); //string strHisSQL = string.Format("Insert into npiHistory (His_Time, npiUser, npiFun, His_SQL) values (NOW(),'npiMan_Add','{0}','{1}') ", username.Trim() , strSQL_Insert); //lblError.Text = strSQL_Insert; // if (db.QueryExecuteNonQuery(strSQL_Insert)) // { // RegisterStartupScript("訊息通知", "<script> alert('資料新增,成功!!');</script>"); // ChangeViewMode(); // } // else // { // //lblError.Text = strSQL_Insert; // RegisterStartupScript("訊息通知", "<script> alert('資料新增,失敗!!');</script>"); // } // } // catch (Exception ex) // { // lblError.Text = "[Error Message::NPI_Manual Form Insert Function]: " + ex.ToString(); // } // } // } //} }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["DateRequested"] = DateTime.Now; }
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { e.Values["personid"] = Request["personid"] + ""; }
protected void FvRegistrationHearing_ItemInserting(object sender, FormViewInsertEventArgs e) { Global.SetFormViewParameters(e.Values, Registration.GetRegistrationHearingRow()); }