Example #1
0
        public DC_Message SupplierMarketSoftDelete(MDMSVC.DC_SupplierMarket RQParams)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["SupplierMarket_SoftDelete"], RQParams, typeof(MDMSVC.DC_SupplierMarket), typeof(DC_Message), out result);
            return(result as DC_Message);
        }
Example #2
0
        public List <MDMSVC.DC_SupplierMarket> GetSupplierMarket(MDMSVC.DC_SupplierMarket RQParams)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["SupplierMarket_Get"], RQParams, typeof(MDMSVC.DC_SupplierMarket), typeof(List <MDMSVC.DC_SupplierMarket>), out result);
            return(result as List <DC_SupplierMarket>);
        }
        protected void frmSupplierMarket_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            Guid    mySupplier_Id         = Guid.Parse(Request.QueryString["Supplier_Id"]);
            TextBox txtSupplierMarketName = (TextBox)frmSupplierMarket.FindControl("txtSupplierMarketName");
            TextBox txtSupplierMarketCode = (TextBox)frmSupplierMarket.FindControl("txtSupplierMarketCode");

            MDMSVC.DC_Message _msg = new MDMSVC.DC_Message();



            if (e.CommandName.ToString() == "Add")
            {
                MDMSVC.DC_SupplierMarket newObj = new MDMSVC.DC_SupplierMarket
                {
                    Supplier_Id = mySupplier_Id,
                    IsActive    = true,
                    Name        = txtSupplierMarketName.Text.Trim(),
                    Code        = txtSupplierMarketCode.Text.Trim(),
                    Status      = "ACT",
                    Create_Date = DateTime.Now,
                    Create_User = System.Web.HttpContext.Current.User.Identity.Name
                };
                _msg = _objMaster.AddUpdateSupplierMarket(newObj);
                if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success))
                {
                    frmSupplierMarket.ChangeMode(FormViewMode.Insert);
                    frmSupplierMarket.DataBind();
                    bindSUpplierMarketsGrid();
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success);
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }


            if (e.CommandName.ToString() == "Modify")
            {
                Guid myRow_Id = Guid.Parse(grdSupplierMarkets.SelectedDataKey.Value.ToString());

                MDMSVC.DC_SupplierMarket newObj = new MDMSVC.DC_SupplierMarket
                {
                    Supplier_Market_Id = myRow_Id,
                    Supplier_Id        = mySupplier_Id,
                    IsActive           = true,
                    Name      = txtSupplierMarketName.Text.Trim(),
                    Code      = txtSupplierMarketCode.Text.Trim(),
                    Edit_Date = DateTime.Now,
                    Edit_User = System.Web.HttpContext.Current.User.Identity.Name
                };

                _msg = _objMaster.AddUpdateSupplierMarket(newObj);
                if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success))
                {
                    frmSupplierMarket.ChangeMode(FormViewMode.Insert);
                    frmSupplierMarket.DataBind();
                    bindSUpplierMarketsGrid();
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success);
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }
        }