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)
        {
            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);
            CompanyClient.Close();
        }
예제 #4
0
        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();
        }
예제 #6
0
        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();
            }
        }
        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();
            }
        }
        // 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 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();
            }
        }
예제 #11
0
        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 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 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);
        }
예제 #14
0
        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();
            }
        }
        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();
            }
        }
        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();
            }
        }