public List <Embsy> Edit(int id) { List <Embsy> lst = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_EMBASSY_FEES_BY_ID); dbCommand.CommandType = CommandType.StoredProcedure; myDataBase.AddInParameter(dbCommand, "@EMBS_FEE_ID", DbType.Int32, id); using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) while (reader.Read()) { Embsy embsy = new Embsy(); embsy.Country = GetStringFromDataReader(reader, "COUNTRY_NAME"); embsy.VisaType = GetStringFromDataReader(reader, "DESCRIPTION_ONE"); embsy.NoOfVisit = GetStringFromDataReader(reader, "DESCRIPTION_TWO"); embsy.Fees = GetIntegerFromDataReader(reader, "VISA_FEES"); embsy.DurationDescription = GetStringFromDataReader(reader, "VISA_DESCRIPTION"); embsy.ProcessTimeDesc = GetStringFromDataReader(reader, "DESCRIPTION"); embsy.CountryId = GetIntegerFromDataReader(reader, "COUNTRY_ID"); embsy.VisaTypeOneId = GetIntegerFromDataReader(reader, "TYPE_ONE_ID"); embsy.VisaTypeTwoId = GetIntegerFromDataReader(reader, "TYPE_TWO_ID"); embsy.VisaDurationId = GetIntegerFromDataReader(reader, "DURATION_ID"); embsy.ProcessTimeId = GetIntegerFromDataReader(reader, "PROCESSTIME_ID"); lst.Add(embsy); } return(lst); }
public List <Embsy> GridbindByAll(Int32 CountryId, Int32 VisaTypeId, Int32 VisaDurationId, Int32 NoOfVisitId, Int32 ProcessTimeId) { List <Embsy> lst = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_EMBASSY_FEE_BY_ALL); myDataBase.AddInParameter(dbCommand, "@CountryId", DbType.Int32, CountryId); myDataBase.AddInParameter(dbCommand, "@VisaTypeId", DbType.Int32, VisaTypeId); myDataBase.AddInParameter(dbCommand, "@visaDurationId", DbType.Int32, VisaDurationId); myDataBase.AddInParameter(dbCommand, "@NoOfVisitId", DbType.Int32, NoOfVisitId); myDataBase.AddInParameter(dbCommand, "@ProcessTimeId", DbType.Int32, ProcessTimeId); using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { Embsy embsy = new Embsy(); embsy.EmbsyMasterId = GetIntegerFromDataReader(reader, "EMB_FEES_ID"); embsy.Country = GetStringFromDataReader(reader, "COUNTRY_NAME"); embsy.VisaType = GetStringFromDataReader(reader, "DESCRIPTION_ONE"); embsy.NoOfVisit = GetStringFromDataReader(reader, "DESCRIPTION_TWO"); embsy.Fees = GetIntegerFromDataReader(reader, "VISA_FEES"); embsy.DurationDescription = GetStringFromDataReader(reader, "VISA_DESCRIPTION"); embsy.ProcessTimeDesc = GetStringFromDataReader(reader, "DESCRIPTION"); lst.Add(embsy); } } return(lst); }
protected void btnSave_Click(object sender, EventArgs e) { Embsy embsy = new Embsy(); embsy.Country = ddl_embsycountry.SelectedItem.Value; if (rbtnlst_visadurationlist.SelectedValue == "1") { embsy.DurationDescription = "Y"; } else { embsy.DurationDescription = "N"; } if (rdblst_processtime.SelectedValue == "1") { embsy.ProcessTimeDesc = "Y"; } else { embsy.ProcessTimeDesc = "N"; } embsy.VfsBlsFee = Convert.ToDecimal(txt_vfs_bls.Text); embsy.TokenFee = Convert.ToDecimal(txt_tokenfee.Text); embsy.AttastationFee = Convert.ToDecimal(txt_attentfee.Text); embsy.HandlingFee = Convert.ToDecimal(txt_handlingfee.Text); embsyBal.Insert1(embsy); BindGrid(); ScriptManager.RegisterClientScriptBlock(btnSave, GetType(), "a", "alert('Record Saved successfully...')", true); Reset(); }
public List <Embsy> ReadEmbassyMasterByCountryId(Int32 CountryId) { List <Embsy> lst = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_EMABASSY_MASTER_BY_COUNTRY_ID); myDataBase.AddInParameter(dbCommand, "@CountryId", DbType.Int32, CountryId); using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { Embsy embsy = new Embsy(); embsy.EmbsyMasterId = GetIntegerFromDataReader(reader, "EMBS_ID"); embsy.Country = GetStringFromDataReader(reader, "COUNTRY_NAME"); embsy.DurationDescription = GetStringFromDataReader(reader, "EMB_VISADURATION_STATUS"); embsy.ProcessTimeDesc = GetStringFromDataReader(reader, "EMB_PROCESSTIME_STATUS"); embsy.VfsBlsFee = GetDecimalFromDataReader(reader, "Vfs_Bls_Charges"); embsy.TokenFee = GetDecimalFromDataReader(reader, "Token_Charges"); embsy.AttastationFee = GetDecimalFromDataReader(reader, "Attestation_Charges"); embsy.HandlingFee = GetDecimalFromDataReader(reader, "Handling_Charges"); lst.Add(embsy); } } return(lst); }
private Embsy GenerateApplicationUserFromDataReader(IDataReader reader) { Embsy embsy = new Embsy(); embsy.VisaTypeTwoId = GetIntegerFromDataReader(reader, "TYPE_TWO_ID"); embsy.NoOfVisit = GetStringFromDataReader(reader, "DESCRIPTION_TWO"); return(embsy); }
protected void btnSave_Click(object sender, EventArgs e) { EmbMasterSummary.ValidationGroup = "a"; String Country = ""; List <Embsy> lstEmbassy = embsyBal.Gridbind(); for (int i = 0; i < lstEmbassy.Count; i++) { if (ddl_embsycountry.SelectedItem.Text == lstEmbassy[i].Country) { Country = lstEmbassy[i].Country; break; } } if (ddl_embsycountry.SelectedItem.Text == Country) { ScriptManager.RegisterClientScriptBlock(btnSave, GetType(), "a", "alert('Embassy Country Is Already Exist.')", true); } else { Embsy embsy = new Embsy(); embsy.Country = ddl_embsycountry.SelectedItem.Value; if (rbtnlst_visadurationlist.SelectedValue == "1") { embsy.DurationDescription = "Y"; } else { embsy.DurationDescription = "N"; } if (rdblst_processtime.SelectedValue == "1") { embsy.ProcessTimeDesc = "Y"; } else { embsy.ProcessTimeDesc = "N"; } embsy.VfsBlsFee = Convert.ToDecimal(txt_vfs_bls.Text); embsy.TokenFee = Convert.ToDecimal(txt_tokenfee.Text); embsy.AttastationFee = Convert.ToDecimal(txt_attentfee.Text); embsy.HandlingFee = Convert.ToDecimal(txt_handlingfee.Text); embsyBal.Insert1(embsy); BindGrid(); ScriptManager.RegisterClientScriptBlock(btnSave, GetType(), "a", "alert('Record Saved Successfully.')", true); } Reset(); }
public void InsertFees(Embsy embsy, int masterid) { DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.INSERT_EMBASSY_FEES); dbCommand.CommandType = CommandType.StoredProcedure; myDataBase.AddInParameter(dbCommand, "@EMB_MASTER_ID", DbType.Int32, masterid); myDataBase.AddInParameter(dbCommand, "@VISA_TYPE_ONE_ID", DbType.String, embsy.VisaType); myDataBase.AddInParameter(dbCommand, "@VISA_TYPE_TWO_ID", DbType.String, embsy.NoOfVisit); myDataBase.AddInParameter(dbCommand, "@VISA_FEES", DbType.Decimal, embsy.Fees); myDataBase.AddInParameter(dbCommand, "@VISA_DURATION", DbType.String, embsy.DurationDescription); myDataBase.AddInParameter(dbCommand, "@PROCESS_TIME", DbType.String, embsy.ProcessTimeDesc); myDataBase.ExecuteNonQuery(dbCommand); }
public void Update(int id, Embsy embsy) { DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.UPDATE_EMBASSY_FEES); dbCommand.CommandType = CommandType.StoredProcedure; myDataBase.AddInParameter(dbCommand, "@EMB_FEE_ID", DbType.Int32, id); myDataBase.AddInParameter(dbCommand, "@EMB_MASTER_ID", DbType.Int32, embsy.EmbsyMasterId); myDataBase.AddInParameter(dbCommand, "@VISA_TYPE_ONE_ID", DbType.Int32, embsy.VisaType); myDataBase.AddInParameter(dbCommand, "@VISA_TYPE_TWO_ID", DbType.Int32, embsy.NoOfVisit); myDataBase.AddInParameter(dbCommand, "@VISA_FEES", DbType.Decimal, embsy.Fees); myDataBase.AddInParameter(dbCommand, "@VISA_DURATION", DbType.Int32, embsy.DurationDescription); myDataBase.AddInParameter(dbCommand, "@PROCESS_TIME", DbType.Int32, embsy.ProcessTimeDesc); myDataBase.ExecuteNonQuery(dbCommand); }
public void Insert(Embsy embsy) { DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.INSERT_EMBASSY_MASTER); dbCommand.CommandType = CommandType.StoredProcedure; myDataBase.AddInParameter(dbCommand, "@Country", DbType.Int32, embsy.Country); myDataBase.AddInParameter(dbCommand, "@VisaDurationStatus", DbType.String, embsy.DurationDescription); myDataBase.AddInParameter(dbCommand, "@ProcessTimeStatus", DbType.String, embsy.ProcessTimeDesc); myDataBase.AddInParameter(dbCommand, "@Vfs_Bls_Fee", DbType.Decimal, embsy.VfsBlsFee); myDataBase.AddInParameter(dbCommand, "@TokenFee", DbType.Decimal, embsy.TokenFee); myDataBase.AddInParameter(dbCommand, "@AttastationFee", DbType.Decimal, embsy.AttastationFee); myDataBase.AddInParameter(dbCommand, "@HandlingCharge", DbType.Decimal, embsy.HandlingFee); myDataBase.ExecuteNonQuery(dbCommand); }
public List <Embsy> BindDropDownNoOfVisit() { List <Embsy> lstEmbsy = new List <Embsy>(); Embsy embsy = new Embsy(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_VISA_TYPE_TWO); dbCommand.CommandType = CommandType.StoredProcedure; using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { embsy = GenerateApplicationUserFromDataReader(reader); lstEmbsy.Add(embsy); } } return(lstEmbsy); }
public List <Embsy> ReadCountry() { List <Embsy> lstCountry = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_COUNTRY); using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { Embsy embasy = new Embsy(); embasy.CountryId = GetIntegerFromDataReader(reader, "COUNTRY_ID"); embasy.Country = GetStringFromDataReader(reader, "COUNTRY_NAME"); lstCountry.Add(embasy); } } return(lstCountry); }
//public List<Embsy> ddl_select_change(string novisit) //{ // List<Embsy> lst = new List<Embsy>(); // Embsy embsy = new Embsy(); // DbCommand dbCommand = myDataBase.GetSqlStringCommand("select fees from demo_visaselect where no_ofvisit='"+ novisit +"'"); // using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) // { // while (reader.Read()) // { // embsy.Fees = GetIntegerFromDataReader(reader, "fees"); // lst.Add(embsy); // } // } // return lst; //} #endregion #region ReadEmbsyMasterId public List <Embsy> GetId(int countryId) { List <Embsy> lst = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_EMBASSY_MASTER_ID); dbCommand.CommandType = CommandType.StoredProcedure; myDataBase.AddInParameter(dbCommand, "@COUNTRY_ID", DbType.Int32, countryId); using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { Embsy embsy = new Embsy(); embsy.EmbsyMasterId = GetIntegerFromDataReader(reader, "Emb_Master_Id"); lst.Add(embsy); } } return(lst); }
public List <Embsy> BindDdlVisaDuration() { List <Embsy> lst = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_VISA_DURATION); dbCommand.CommandType = CommandType.StoredProcedure; using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { Embsy embsy = new Embsy(); embsy.DurationDescription = GetStringFromDataReader(reader, "VISA_DESCRIPTION"); embsy.VisaDurationId = GetIntegerFromDataReader(reader, "DURATION_ID"); lst.Add(embsy); } } return(lst); }
public List <Embsy> BindDdlProcessTime() { List <Embsy> lst = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_PROCESS_TIME); dbCommand.CommandType = CommandType.StoredProcedure; using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { Embsy embsy = new Embsy(); embsy.ProcessTimeDesc = GetStringFromDataReader(reader, "DESCRIPTION"); embsy.ProcessTimeId = GetIntegerFromDataReader(reader, "PROCESSTIME_ID"); lst.Add(embsy); } } return(lst); }
protected void btn_save_Click(object sender, EventArgs e) { Embsy embsy = new Embsy(); GetMasterId2(); int masterid = Convert.ToInt32(ViewState["masterid"]); //embsyFeeBusinessAccess.GetId1(countryname); embsy.VisaType = ddl_visatype.SelectedItem.Value; embsy.NoOfVisit = ddl_no_ofvisit.SelectedItem.Value; embsy.Fees = Convert.ToDecimal(txt_fees.Text); embsy.DurationDescription = ddl_visaduration.SelectedItem.Value; embsy.ProcessTimeDesc = ddl_processtime.SelectedItem.Value; embsyFeeBusinessAccess.InsertEmbsyFee(embsy, masterid); ScriptManager.RegisterClientScriptBlock(btn_save, GetType(), "a", "alert('Record Saved successfully...')", true); BindGrid(); reset(); }
protected void btn_update_Click(object sender, EventArgs e) { int Id = Convert.ToInt32(ViewState["Id"]); Embsy embsy = new Embsy(); GetMasterId2(); embsy.EmbsyMasterId = Convert.ToInt32(ViewState["masterid"]); embsy.VisaType = ddl_visatype.SelectedItem.Value; embsy.NoOfVisit = ddl_no_ofvisit.SelectedItem.Value; embsy.Fees = Convert.ToDecimal(txt_fees.Text); embsy.DurationDescription = ddl_visaduration.SelectedItem.Value; embsy.ProcessTimeDesc = ddl_processtime.SelectedItem.Value; embsyFeeBusinessAccess.Update1(Id, embsy); BindGrid(); ScriptManager.RegisterClientScriptBlock(btn_update, GetType(), "a", "alert('Record Updated successfully...')", true); btn_save.Visible = true; btn_update.Visible = false; reset(); }
protected void btnUpdate_Click1(object sender, EventArgs e) { //int id = Convert.ToInt32(ViewState["id"]); Embsy embsy = new Embsy(); embsy.EmbsyMasterId = this.MasterId; embsy.Country = ddl_embsycountry.SelectedValue; if (rbtnlst_visadurationlist.SelectedValue == "1") { embsy.DurationDescription = "Y"; } else { embsy.DurationDescription = "N"; } if (rdblst_processtime.SelectedValue == "1") { embsy.ProcessTimeDesc = "Y"; } else { embsy.ProcessTimeDesc = "N"; } embsy.VfsBlsFee = Convert.ToDecimal(txt_vfs_bls.Text); embsy.TokenFee = Convert.ToDecimal(txt_tokenfee.Text); embsy.AttastationFee = Convert.ToDecimal(txt_attentfee.Text); embsy.HandlingFee = Convert.ToDecimal(txt_handlingfee.Text); embsyBal.Update1(embsy); BindGrid(); btnSave.Visible = true; btnUpdate.Visible = false; ddl_embsycountry.Enabled = true; ScriptManager.RegisterClientScriptBlock(btnUpdate, GetType(), "a", "alert('Record Updated Successfully.')", true); Reset(); }
public List <Embsy> Gridbind() { List <Embsy> lst = new List <Embsy>(); DbCommand dbCommand = myDataBase.GetStoredProcCommand(DBConstant.READ_EMBASSY_FEES); dbCommand.CommandType = CommandType.StoredProcedure; using (IDataReader reader = myDataBase.ExecuteReader(dbCommand)) { while (reader.Read()) { Embsy embsy = new Embsy(); embsy.EmbsyMasterId = GetIntegerFromDataReader(reader, "EMB_FEES_ID"); embsy.Country = GetStringFromDataReader(reader, "COUNTRY_NAME"); embsy.VisaType = GetStringFromDataReader(reader, "DESCRIPTION_ONE"); embsy.NoOfVisit = GetStringFromDataReader(reader, "DESCRIPTION_TWO"); embsy.Fees = GetIntegerFromDataReader(reader, "VISA_FEES"); embsy.DurationDescription = GetStringFromDataReader(reader, "VISA_DESCRIPTION"); embsy.ProcessTimeDesc = GetStringFromDataReader(reader, "DESCRIPTION"); lst.Add(embsy); } } return(lst); }
public void Update1(Embsy embsy) { embsyDal.Update(embsy); }
public void Insert1(Embsy embsy) { embsyDal.Insert(embsy); }
public void Update1(int id, Embsy embsy) { embsyFeeDataAccess.Update(id, embsy); }
public void InsertEmbsyFee(Embsy embsy, int masterid) { embsyFeeDataAccess.InsertFees(embsy, masterid); }