protected void BtnUpdate_Click(object sender, EventArgs e) { A2ZTRNOPTDTO UpDTO = new A2ZTRNOPTDTO(); UpDTO.AccType = Converter.GetInteger(txtAccType.Text); UpDTO.FunctionOption = Converter.GetInteger(ddlFunctionOpt.SelectedValue); UpDTO.PayType = Converter.GetInteger(ddlPayType.SelectedValue); UpDTO.TrnType = Converter.GetInteger(ddlTrnType.SelectedValue); UpDTO.TrnMode = Converter.GetInteger(ddlTrnMode.SelectedValue); UpDTO.TrnAmtLogic = Converter.GetInteger(ddlTranAmtLogic.SelectedValue); UpDTO.TrnValidation = Converter.GetInteger(ddlTranValidation.SelectedValue); UpDTO.AccTypeDes = Converter.GetString(lblTypeDes.Text); int roweffect = A2ZTRNOPTDTO.UpdateInformation(UpDTO); if (roweffect > 0) { clearinfo(); ddlAcType.SelectedValue = "0"; BtnSubmit.Visible = true; BtnUpdate.Visible = false; txtAccType.Focus(); txtAccType.Text = string.Empty; lblclass.Text = string.Empty; } }
protected void ddlPayType_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPayType.SelectedValue != "-Select-") { Int16 MainCode = Converter.GetSmallInteger(txtAccType.Text); int functopt = Converter.GetInteger(ddlFunctionOpt.SelectedValue); int PayType = Converter.GetInteger(ddlPayType.SelectedValue); A2ZTRNOPTDTO TrnDTO = (A2ZTRNOPTDTO.GetInformation(MainCode, functopt, PayType)); if (TrnDTO.Record > 0) { ddlTrnType.SelectedValue = Converter.GetString(TrnDTO.TrnType); ddlTrnMode.SelectedValue = Converter.GetString(TrnDTO.TrnMode); ddlTranAmtLogic.SelectedValue = Converter.GetString(TrnDTO.TrnAmtLogic); ddlTranValidation.SelectedValue = Converter.GetString(TrnDTO.TrnValidation); BtnUpdate.Visible = true; BtnSubmit.Visible = false; } else { ddlPayType.Focus(); BtnSubmit.Visible = true; BtnUpdate.Visible = false; } } }
protected void BtnSubmit_Click(object sender, EventArgs e) { try { A2ZTRNOPTDTO objDTO = new A2ZTRNOPTDTO(); objDTO.AccType = Converter.GetInteger(txtAccType.Text); objDTO.AccTypeDes = Converter.GetString(lblTypeDes.Text); objDTO.FunctionOption = Converter.GetInteger(ddlFunctionOpt.SelectedValue); objDTO.PayType = Converter.GetInteger(ddlPayType.SelectedValue); objDTO.TrnType = Converter.GetInteger(ddlTrnType.SelectedValue); objDTO.TrnMode = Converter.GetInteger(ddlTrnMode.SelectedValue); objDTO.TrnAmtLogic = Converter.GetInteger(ddlTranAmtLogic.SelectedValue); objDTO.TrnValidation = Converter.GetInteger(ddlTranValidation.SelectedValue); int roweffect = A2ZTRNOPTDTO.InsertInformation(objDTO); if (roweffect > 0) { txtAccType.Text = string.Empty; txtAccType.Focus(); clearinfo(); lblclass.Text = string.Empty; } } catch (Exception ex) { throw ex; } }