private void FillCustomerDeatilGrid() { try { iUserCreationClient userClient = new iUserCreationClient(); CustomProfile profile = CustomProfile.GetProfile(); //GvAccount.DataSource = AccountClient.GetGetCustomerDetail(profile.Personal.UserID,profile.DBConnection._constr);//UserID added by vishal old GvAccount.DataSource = userClient.GWCSearchUserList(CompanyID, DeptId, profile.DBConnection._constr); //Change by Suresh For GCC Admin Invoiceing iCompanySetupClient Cmpny = new iCompanySetupClient(); // GvAccount.DataSource = Cmpny.GetInstituteDetails(profile.DBConnection._constr); if (GvAccount.DataSource != null) { GvAccount.DataBind(); } userClient.Close(); } catch (System.Exception ex) { // Login.Profile.ErrorHandling(ex, this, "AccountSearch.aspx", "FillCustomerDeatilGrid"); } finally { } }
protected void btncustomernext_Click(object sender, System.EventArgs e) { CustomProfile profile = CustomProfile.GetProfile(); iCompanySetupClient aggregator = new iCompanySetupClient(); try { mAgreegator aggree = new mAgreegator(); aggree.AgreegatorName = txtaggregator.Text; aggree.ContactPersonName = txtcontactperson.Text; aggree.EmailID = txtemail.Text; aggree.MobileNo = long.Parse(txtmobno.Text); aggree.Active = "Yes"; if (rbtnActiveNo.Checked == true) { aggree.Active = "No"; } aggree.CompanyID = long.Parse(hdnCompanyid.Value); aggree.CustomerID = long.Parse(hdncustomerid.Value); aggree.CreatedBy = profile.Personal.UserID; aggree.CreationDate = DateTime.Now; long AggreeID = aggregator.SaveAggregatorMaster(aggree, profile.DBConnection._constr); hdnselectedAggID.Value = AggreeID.ToString(); setActiveTab(2); btncustomernext.Visible = false; } catch (Exception ex) { Login.Profile.ErrorHandling(ex, this, "Aggregator Master", "Buttonnextsave"); } finally { aggregator.Close(); } }
protected void pageSave(Object sender, BrilliantWMS.ToolbarService.iUCToolbarClient e) { CustomProfile profile = CustomProfile.GetProfile(); iCompanySetupClient aggregator = new iCompanySetupClient(); mAgreegator aggree = new mAgreegator(); if (hdnState.Value == "Edit") { aggree = aggregator.GetAggregatorMasterbyID(long.Parse(hdnselectedAggID.Value), profile.DBConnection._constr); } aggree.AgreegatorName = txtaggregator.Text; aggree.ContactPersonName = txtcontactperson.Text; aggree.EmailID = txtemail.Text; aggree.MobileNo = long.Parse(txtmobno.Text); aggree.Active = "Yes"; if (rbtnActiveNo.Checked == true) { aggree.Active = "No"; } aggree.CompanyID = long.Parse(hdnCompanyid.Value); aggree.CustomerID = long.Parse(hdncustomerid.Value); if (hdnState.Value == "Edit") { aggree.ModifiedBy = profile.Personal.UserID; aggree.ModifiedDate = DateTime.Now; long AggreeID = aggregator.SaveAggregatorMaster(aggree, profile.DBConnection._constr); } BindAgregatorGridMain(); setActiveTab(0); }
protected void pageSave(Object sender, BrilliantWMS.ToolbarService.iUCToolbarClient e) { iCompanySetupClient CompanyClient = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); mChannel Channel = new mChannel(); if (hdnState.Value == "Edit") { Channel = CompanyClient.GetChannelByChanID(long.Parse(hdnselectedchanID.Value), profile.DBConnection._constr); } Channel.ChannelName = txtchannelname.Text; Channel.ChannelURL = txtchanlUrl.Text; Channel.UserName = txtusername.Text; Channel.Password = txtpassword.Text; Channel.TypeID = long.Parse(ddlchantype.SelectedItem.Value); if (hdnchannelid.Value != "") { Channel.StandardChannelID = long.Parse(hdnchannelid.Value); } if (hndCompanyid.Value != "") { Channel.CompanyID = long.Parse(hndCompanyid.Value); } Channel.CustomerID = long.Parse(hdncustomerid.Value); Channel.Active = "Yes"; if (rbtnActiveYes.Checked != true) { Channel.Active = "No"; } if (hdnState.Value == "Edit") { Channel.ModifiedBy = profile.Personal.UserID; Channel.ModifiedDate = DateTime.Today; long channelid = CompanyClient.SaveChannelDetail(Channel, profile.DBConnection._constr); } else { Channel.CreatedBy = profile.Personal.UserID; Channel.CreationDate = DateTime.Now; long channelid = CompanyClient.SaveChannelDetail(Channel, profile.DBConnection._constr); } WebMsgBox.MsgBox.Show("Record saved successfully"); WarehouseGridBind(); clear(); setActiveTab(0); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Channel Master", "Save"); } finally { CompanyClient.Close(); } }
protected void FillCompany() { ddlcompany.Items.Clear(); iCompanySetupClient CompanyClient = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); ddlcompany.DataSource = CompanyClient.GetCompanyDropDown(profile.Personal.CompanyID, profile.DBConnection._constr); ddlcompany.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddlcompany.Items.Insert(0, lst); }
public void GetAggreAPIDetailByID(long APIID) { iCompanySetupClient aggregator = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); mAgreegatorAPI aggreAPI = new mAgreegatorAPI(); aggreAPI = aggregator.GetAggreegatorAPIbyID(APIID, profile.DBConnection._constr); if (aggreAPI.AgreegatorID != null) { hdnselectedAggID.Value = aggreAPI.AgreegatorID.ToString(); } if (aggreAPI.APIName != null) { txtapi.Text = aggreAPI.APIName.ToString(); } if (aggreAPI.Purpose != null) { txtpurpose.Text = aggreAPI.Purpose.ToString(); } if (aggreAPI.InputParameter != null) { txtinputpara.Text = aggreAPI.InputParameter.ToString(); } if (aggreAPI.OutputParameter != null) { txtoutputpara.Text = aggreAPI.OutputParameter.ToString(); } if (aggreAPI.APIURL != null) { txturl.Text = aggreAPI.APIURL.ToString(); } if (aggreAPI.Remark != null) { txtremark.Text = aggreAPI.Remark.ToString(); } if (aggreAPI.CompanyID != null) { hdnCompanyid.Value = aggreAPI.CompanyID.ToString(); } if (aggreAPI.CustomerID != null) { hdncustomerid.Value = aggreAPI.CustomerID.ToString(); } if (aggreAPI.Active == "No") { rbtnActiveNo.Checked = true; } }
protected void GetRateType() { ddlratetype.Items.Clear(); iCompanySetupClient CompanyClient = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); ddlratetype.DataSource = CompanyClient.GetRateTypeDropdown("RateCard", profile.DBConnection._constr); ddlratetype.DataTextField = "Value"; ddlratetype.DataValueField = "Id"; ddlratetype.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddlratetype.Items.Insert(0, lst); CompanyClient.Close(); }
// Get Channel Name public void GetChannelByType() { ddlchannel.Items.Clear(); iCompanySetupClient Channel = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); ddlchannel.DataSource = Channel.GetChannelName("Channel", profile.DBConnection._constr); ddlchannel.DataTextField = "Value"; ddlchannel.DataValueField = "Id"; ddlchannel.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddlchannel.Items.Insert(0, lst); Channel.Close(); }
private List <ReportParameter> RptParameters1() { CustomProfile profile = CustomProfile.GetProfile(); List <ReportParameter> parameters = new List <ReportParameter>(); mCompany compdetails = new mCompany(); iCompanySetupClient compclient = new iCompanySetupClient(); compdetails = compclient.GetCompanyById(profile.Personal.CompanyID, profile.DBConnection._constr); // parameters.Add(new ReportParameter("CompName", compdetails.Name)); //parameters.Add(new ReportParameter("CompAdd", compdetails.AddressLine1)); //parameters.Add(new ReportParameter("FromDt", Session["FromDt"].ToString())); //parameters.Add(new ReportParameter("ToDt", Session["ToDt"].ToString())); //parameters.Add(new ReportParameter("ReportHeading", Session["ReportHeading"].ToString())); //parameters.Add(new ReportParameter("Generator", Session["Generator"].ToString())); // parameters.Add(new ReportParameter("CompLogo","../MasterPage/Logo/" + compdetails.LogoPath)); return(parameters); }
protected void pageSave(Object sender, BrilliantWMS.ToolbarService.iUCToolbarClient e) { CustomProfile profile = CustomProfile.GetProfile(); iCompanySetupClient ratecardclient = new iCompanySetupClient(); mRateCard RateCard = new mRateCard(); if (hndState.Value == "Edit") { RateCard = ratecardclient.GetRateCardByID(long.Parse(hdnratecardId.Value), profile.DBConnection._constr); } RateCard.Type = ddlaccounttypeer.SelectedItem.Text; RateCard.RateDetails = txtratetitle.Text; RateCard.Rate = decimal.Parse(txtprice.Text); RateCard.FromDate = UC_Startdt.Date; RateCard.ToDate = UC_enddt.Date; RateCard.EffDate = UC_effectivedt.Date; RateCard.CompanyID = long.Parse(ddlgroupcompany.SelectedItem.Value); RateCard.RateType = long.Parse(ddlratetype.SelectedItem.Value); RateCard.AccountID = long.Parse(hdnAccountID.Value); RateCard.Remark = txtremark.Text; RateCard.AccountName = hdnAccountName.Value; RateCard.Active = "Yes"; if (rbtnActiveNo.Checked == true) { RateCard.Active = "No"; } if (hndState.Value == "Edit") { RateCard.ModifiedBy = profile.Personal.UserID; RateCard.ModifiedDate = DateTime.Now; long ratecardID = ratecardclient.SaveRateCardMaster(RateCard, profile.DBConnection._constr); WebMsgBox.MsgBox.Show("Record Updated Successfully"); } else { RateCard.CreatedBy = profile.Personal.UserID; RateCard.CreationDate = DateTime.Now; long ratecardID = ratecardclient.SaveRateCardMaster(RateCard, profile.DBConnection._constr); WebMsgBox.MsgBox.Show("Record Saved Successfully"); } clr(); MainRateCardGrid(); ActiveTab("Load"); }
protected void MainRateCardGrid() { iCompanySetupClient Ratecard = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); grdratecard.DataSource = Ratecard.GetRateCardDetails(profile.DBConnection._constr); grdratecard.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Account Master", "MainCustomerGridBind"); } finally { Ratecard.Close(); } }
// Code For Aggregator API protected void BindAggreAPIGrid(long AggreID) { iCompanySetupClient aggregator = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); grdapidetail.DataSource = aggregator.GetAPIListByID(AggreID, profile.DBConnection._constr); grdapidetail.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Aggrgator Master", "BindAgregatorGridMain"); } finally { aggregator.Close(); } }
protected void WarehouseGridBind() { iCompanySetupClient Channel = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); grdchannel.DataSource = Channel.GetChannelList(profile.DBConnection._constr); grdchannel.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Warehouse Master", "MainCustomerGridBind"); } finally { Channel.Close(); } }
public void BindAgregatorGridMain() { iCompanySetupClient aggregator = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); grdaggregator.DataSource = aggregator.GetAggregatorList(profile.DBConnection._constr); grdaggregator.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Aggrgator Master", "BindAgregatorGridMain"); } finally { aggregator.Close(); } }
protected void GetVendorRatecard() { iCompanySetupClient vendor = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); string Type = "Vendor"; grdratecard.DataSource = vendor.GetVendorRateByVendorID(Convert.ToInt64(HdnAccountId.Value), Type, profile.DBConnection._constr); grdratecard.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Vendor Master", "GetVendorRatecard"); } finally { vendor.Close(); } }
public void BindGrid() { iCompanySetupClient TermsClient = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); // gvTerm.DataSource = TermsClient.GetTermRecordToBindGrid(profile.DBConnection._constr); gvTerm.DataSource = TermsClient.GetTermsnConditionList(profile.DBConnection._constr); gvTerm.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, " Terms and Conditions Master", "BindGrid"); } finally { TermsClient.Close(); } }
public static List <contact> GetChannel(object objReq) { iCompanySetupClient Channel = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); DataSet ds = new DataSet(); DataTable dt = new DataTable(); List <contact> LocList = new List <contact>(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary = (Dictionary <string, object>)objReq; //long ddlcompanyId = long.Parse(dictionary["ddlcompanyId"].ToString()); string ChannelType = "Channel"; ds = Channel.GetChannelName(ChannelType, profile.DBConnection._constr); dt = ds.Tables[0]; contact Loc = new contact(); Loc.Name = "--Select--"; Loc.Id = "0"; LocList.Add(Loc); Loc = new contact(); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { Loc.Id = dt.Rows[i]["Id"].ToString(); Loc.Name = dt.Rows[i]["Value"].ToString(); LocList.Add(Loc); Loc = new contact(); } } } catch { } finally { Channel.Close(); } return(LocList); }
public void GetAggregatmasterDetail(long AggregatID) { iCompanySetupClient aggregator = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); mAgreegator aggree = new mAgreegator(); aggree = aggregator.GetAggregatorMasterbyID(AggregatID, profile.DBConnection._constr); FillCompany(); if (aggree.CompanyID != null) { ddlcompany.SelectedIndex = ddlcompany.Items.IndexOf(ddlcompany.Items.FindByValue(aggree.CompanyID.ToString())); } hdnCompanyid.Value = aggree.CompanyID.ToString(); getCustomer(long.Parse(aggree.CompanyID.ToString())); if (aggree.CustomerID != null) { ddlcutomer.SelectedIndex = ddlcutomer.Items.IndexOf(ddlcutomer.Items.FindByValue(aggree.CustomerID.ToString())); } hdncustomerid.Value = aggree.CustomerID.ToString(); if (aggree.AgreegatorName != null) { txtaggregator.Text = aggree.AgreegatorName.ToString(); } if (aggree.ContactPersonName != null) { txtcontactperson.Text = aggree.ContactPersonName.ToString(); } if (aggree.EmailID != null) { txtemail.Text = aggree.EmailID.ToString(); } if (aggree.MobileNo != null) { txtmobno.Text = aggree.MobileNo.ToString(); } if (aggree.Active == "No") { rbtnActiveNo.Checked = true; } }
protected void MainClientGridBind() { iCompanySetupClient client = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); List <V_WMS_GetClientDetails> clintlst = new List <V_WMS_GetClientDetails>(); clintlst = client.GetClientList(profile.DBConnection._constr).ToList(); clintlst = clintlst.Where(c => c.CompanyID == profile.Personal.CompanyID).ToList(); GvCustomer.DataSource = clintlst; GvCustomer.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Client Master", "MainClientGridBind"); } finally { client.Close(); } }
protected void MainCustomerGridBind() { iCompanySetupClient vendor = new iCompanySetupClient(); try { CustomProfile profile = CustomProfile.GetProfile(); List <V_WMS_GetVendorDetails> vend = new List <V_WMS_GetVendorDetails>(); vend = vendor.GetVendorList(profile.DBConnection._constr).ToList(); vend = vend.Where(v => v.CompanyID == profile.Personal.CompanyID).ToList(); GvCustomer.DataSource = vend; GvCustomer.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Account Master", "MainCustomerGridBind"); } finally { vendor.Close(); } }
public static string WMSaveAPIDetail(object objCon, string State) { string result = ""; CustomProfile profile = CustomProfile.GetProfile(); iCompanySetupClient aggregator = new iCompanySetupClient(); mAgreegatorAPI AgreAPI = new mAgreegatorAPI(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary = (Dictionary <string, object>)objCon; AgreAPI.AgreegatorID = long.Parse(dictionary["AggregatorID"].ToString()); AgreAPI.APIName = dictionary["APIName"].ToString(); AgreAPI.Purpose = dictionary["Purpose"].ToString(); AgreAPI.InputParameter = dictionary["InputPara"].ToString(); AgreAPI.OutputParameter = dictionary["OutPutPara"].ToString(); AgreAPI.APIURL = dictionary["ApiURL"].ToString(); AgreAPI.Remark = dictionary["Remark"].ToString(); AgreAPI.Active = dictionary["Active"].ToString(); AgreAPI.CompanyID = long.Parse(dictionary["CompanyID"].ToString()); AgreAPI.CustomerID = long.Parse(dictionary["CustomerID"].ToString()); if (State == "Edit") { AgreAPI.ID = Convert.ToInt64(HttpContext.Current.Session["AggreAPIID"].ToString()); long AggiAPIID = aggregator.SaveAggreegatorAPI(AgreAPI, profile.DBConnection._constr); } else { long AggiAPIID = aggregator.SaveAggreegatorAPI(AgreAPI, profile.DBConnection._constr); } result = "API saved successfully"; } catch { result = "Some error occurred"; } finally { aggregator.Close(); } return(result); }
public void GetRateCardByID(long RateCardID) { CustomProfile profile = CustomProfile.GetProfile(); iCompanySetupClient ratecardclient = new iCompanySetupClient(); mRateCard RateCard = new mRateCard(); RateCard = ratecardclient.GetRateCardByID(RateCardID, profile.DBConnection._constr); ddlgroupcompany.SelectedIndex = ddlgroupcompany.Items.IndexOf(ddlgroupcompany.Items.FindByValue(RateCard.CompanyID.ToString())); ddlaccounttypeer.SelectedIndex = ddlaccounttypeer.Items.IndexOf(ddlaccounttypeer.Items.FindByText(RateCard.Type.ToString())); ddlratetype.SelectedIndex = ddlratetype.Items.IndexOf(ddlratetype.Items.FindByValue(RateCard.RateType.ToString())); txtprice.Text = RateCard.Rate.ToString(); txtratetitle.Text = RateCard.RateDetails.ToString(); UC_Startdt.Date = RateCard.FromDate; UC_enddt.Date = RateCard.ToDate; UC_effectivedt.Date = RateCard.EffDate; rbtnActiveYes.Checked = true; if (RateCard.Active == "No") { rbtnActiveNo.Checked = true; } txtname.Text = RateCard.AccountName.ToString(); hdnAccountID.Value = RateCard.AccountID.ToString(); txtremark.Text = RateCard.Remark.ToString(); }
public void GetChannelForEdit(long channelID) { iCompanySetupClient CompanyClient = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); try { mChannel chan = new mChannel(); chan = CompanyClient.GetChannelByChanID(channelID, profile.DBConnection._constr); if (chan.ChannelName != null) { txtchannelname.Text = chan.ChannelName.ToString(); } if (chan.ChannelURL != null) { txtchanlUrl.Text = chan.ChannelURL.ToString(); } if (chan.UserName != null) { txtusername.Text = chan.UserName.ToString(); } if (chan.Password != null) { txtpassword.Text = chan.Password.ToString(); } txtpassword.Attributes["value"] = chan.Password.ToString(); if (chan.Active == "No") { rbtnActiveNo.Checked = true; } FillCompany(); if (chan.CompanyID != null) { ddlcompany.SelectedIndex = ddlcompany.Items.IndexOf(ddlcompany.Items.FindByValue(chan.CompanyID.ToString())); } hndCompanyid.Value = chan.CompanyID.ToString(); getCustomer(long.Parse(chan.CompanyID.ToString())); if (chan.CustomerID != null) { ddlcutomer.SelectedIndex = ddlcutomer.Items.IndexOf(ddlcutomer.Items.FindByValue(chan.CustomerID.ToString())); } hdncustomerid.Value = chan.CustomerID.ToString(); // if (chan.TypeID != null) ddlchantype.SelectedIndex = ddlcutomer.Items.IndexOf(ddlchantype.Items.FindByValue(chan.TypeID.ToString())); if (chan.TypeID != null) { ddlchantype.SelectedItem.Value = chan.TypeID.ToString(); } ddlchantype.SelectedValue = chan.TypeID.ToString(); if (chan.TypeID.ToString() == "1") { ddlchantype.SelectedIndex = 1; } else if (chan.TypeID.ToString() == "2") { ddlchantype.SelectedIndex = 2; } if (chan.TypeID.ToString() == "1") { GetChannelByType(); if (chan.StandardChannelID != null) { ddlchannel.SelectedIndex = ddlchannel.Items.IndexOf(ddlchannel.Items.FindByValue(chan.StandardChannelID.ToString())); } } else { ddlchannel.Enabled = false; } } catch (Exception ex) { Login.Profile.ErrorHandling(ex, this, "Channel Master", "GetChannelForEdit"); } finally { CompanyClient.Close(); } }