示例#1
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtSalesOrderId.Text = dgvSaleOrderItem.DataKeys[gvrow.RowIndex].Value.ToString();
            ddlSalesOrderId.SelectedItem.Selected = false;
            ddlSalesOrderId.Items.FindByText(gvrow.Cells[0].Text.ToString()).Selected = true;
            ddlItemId.SelectedItem.Value   = gvrow.Cells[1].Text;
            txtItemUnit.Text               = gvrow.Cells[2].Text;
            txtDescription.Text            = gvrow.Cells[3].Text;
            txtItemCostPrice.Text          = gvrow.Cells[4].Text;
            txtItemSalePrice.Text          = gvrow.Cells[5].Text;
            txtItemDiscountPercentage.Text = gvrow.Cells[6].Text;
            txtItemDiscount.Text           = gvrow.Cells[7].Text;
            int i = Convert.ToInt32(gvrow.Cells[8].Text);

            if (i == 1)
            {
                cbIsActive.Checked = true;
            }
            else
            {
                cbIsActive.Checked = false;
            }
            updateSaleOrderItemBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#2
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode             = CommandMode.D;
     objPurchaseReceived = new Store.PurchaseReceived.BusinessObject.PurchaseReceived();
     oblPurchaseReceived = new Store.PurchaseReceived.BusinessLogic.PurchaseReceived();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objPurchaseReceived.PurchaseReceivedID     = Convert.ToInt32(dgvPurchaseReceived.DataKeys[gvrow.RowIndex].Value.ToString());
         objPurchaseReceived.VendorID               = 1;
         objPurchaseReceived.PurchaseRecivedDate    = DateTime.Now;
         objPurchaseReceived.PurchaseAmount         = 2;
         objPurchaseReceived.TaxValue               = 3;
         objPurchaseReceived.ShipingAndHandlingCost = 4;
         objPurchaseReceived.PurchaseOrderID        = 5;
         objPurchaseReceived.CreatedBy              = 1;
         //objMessageInfo =oblPurchaseReceived.ManagePurchaseOrderMaster(objPurchaseReceived, cmdMode);
         BindPurchaseReceived();
         updatePurchasedReceivedBdInfo.Update();
     }
     catch (Exception ex)
     {
         throw;
     }
     finally
     {
         objPurchaseReceived = null;
         objMessageInfo      = null;
         oblPurchaseReceived = null;
     }
 }
示例#3
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            //txtItemDiscountPerUnit   txtDiscount
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtItemId.Text         = dgvItem.DataKeys[gvrow.RowIndex].Value.ToString();
            txtItemPrefix.Text     = gvrow.Cells[0].Text;
            txtItemCode.Text       = gvrow.Cells[1].Text;
            txtBarcode.Text        = gvrow.Cells[2].Text;
            txtItemDecription.Text = gvrow.Cells[3].Text;
            ddlItemUnitId.SelectedItem.Selected = false;
            ddlItemUnitId.Items.FindByText(gvrow.Cells[4].Text.ToString()).Selected = true;
            //txtCostPrice.Text = gvrow.Cells[5].Text;
            //txtSalePrice.Text = gvrow.Cells[6].Text;
            //txtItemDiscountPerUnit.Text = gvrow.Cells[7].Text;
            //txtFrom.Text = gvrow.Cells[8].Text;
            //txtTo.Text = gvrow.Cells[9].Text;
            //txtBatchNo.Text = gvrow.Cells[10].Text;
            ddlCategoryId.SelectedItem.Selected = false;
            ddlCategoryId.Items.FindByText(gvrow.Cells[5].Text.ToString()).Selected = true;
            updateItemBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#4
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtSalesReturnedID.Text         = dgvSalesReturned.DataKeys[gvrow.RowIndex].Value.ToString();
            ddlVendor.SelectedItem.Selected = false;
            ddlVendor.Items.FindByText(gvrow.Cells[0].Text.ToString()).Selected = true;
            txtSalesReturnDate.Text        = gvrow.Cells[1].Text;
            txtTotalSalesReturnAmount.Text = gvrow.Cells[2].Text;
            txtTaxValue.Text                      = gvrow.Cells[3].Text;
            txtShippingHandlingCost.Text          = gvrow.Cells[4].Text;
            txtMiscCost.Text                      = gvrow.Cells[5].Text;
            ddlSalesOrderID.SelectedItem.Selected = false;
            ddlSalesOrderID.Items.FindByText(gvrow.Cells[6].Text.ToString()).Selected = true;
            int i = Convert.ToInt32(gvrow.Cells[5].Text);

            if (i == 1)
            {
                cbIsActive.Checked = true;
            }
            else
            {
                cbIsActive.Checked = false;
            }

            updateSalesReturnedBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#5
0
        protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
        {
            cmdMode = CommandMode.D;
            objPurchaseReceivedItem = new Store.PurchaseReceivedItem.BusinessObject.PurchaseReceivedItem();
            oblPurchaseReceivedItem = new Store.PurchaseReceivedItem.BusinessLogic.PurchaseReceivedItem();


            try
            {
                ImageButton btndetails = sender as ImageButton;
                GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
                objPurchaseReceivedItem.PurchaseItemReceivedID = Convert.ToInt32(dgvPurchaseItemReceived.DataKeys[gvrow.RowIndex].Value.ToString());
                objPurchaseReceivedItem.PurchaseReceivedID     = 0;
                objPurchaseReceivedItem.PurchaseOrderID        = 0;
                objPurchaseReceivedItem.ItemID      = 0;
                objPurchaseReceivedItem.ItemUnit    = "";
                objPurchaseReceivedItem.Description = "";
                objPurchaseReceivedItem.ItemPrice   = 0;
                objPurchaseReceivedItem.ClientID    = 0;
                objPurchaseReceivedItem.CreatedBy   = 1;
                objMessageInfo = oblPurchaseReceivedItem.ManageItemMaster(objPurchaseReceivedItem, cmdMode);
                BindPurchaseReceivedItem();
                updatePurchasedItemReceivedBdInfo.Update();
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objPurchaseReceivedItem = null;
                objMessageInfo          = null;
                oblPurchaseReceivedItem = null;
            }
        }
示例#6
0
 protected void linkButton_Click(object sender, EventArgs e)
 {
     cmdMode = CommandMode.N;
     ResetForm();
     updatePurchasedItemReceivedBdInfo.Update();
     this.ModalPopupExtender1.Show();
 }
示例#7
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtPurchaseItemReceivedID.Text = dgvPurchaseItemReceived.DataKeys[gvrow.RowIndex].Value.ToString();
            ddlPurchaseReceivedId.SelectedItem.Selected = false;
            ddlPurchaseReceivedId.Items.FindByText(gvrow.Cells[0].Text.ToString()).Selected = true;
            ddlPurchaseOrderId.SelectedItem.Selected = false;
            ddlPurchaseOrderId.Items.FindByText(gvrow.Cells[1].Text.ToString()).Selected = true;
            ddlItemId.SelectedItem.Selected = false;
            ddlItemId.Items.FindByText(gvrow.Cells[2].Text.ToString()).Selected = true;
            txtItemUnit.Text    = gvrow.Cells[3].Text;
            txtDescription.Text = gvrow.Cells[4].Text;
            txtItemPrice.Text   = gvrow.Cells[5].Text;
            int i = Convert.ToInt32(gvrow.Cells[6].Text);

            if (i == 1)
            {
                chkBoxIsActive.Checked = true;
            }
            else
            {
                chkBoxIsActive.Checked = false;
            }
            updatePurchasedItemReceivedBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#8
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode   = CommandMode.D;
     objClient = new Store.Client.BusinessObject.Client();
     oblClient = new Store.Client.BusinessLogic.Client();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objClient.ClientID          = Convert.ToInt32(dgvClient.DataKeys[gvrow.RowIndex].Value.ToString());
         objClient.ClientName        = "";
         objClient.ClientDisplayName = "";
         objClient.Address           = "";
         objClient.CityID            = 0;
         objClient.StateID           = 1;
         objClient.CountryID         = 2;
         objClient.PinID             = 3;
         objClient.CreatedBy         = 1;
         objMessageInfo = oblClient.ManageClientMaster(objClient, cmdMode);
         BindClient();
         updateClientBdInfo.Update();
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1);
     }
     finally
     {
         objClient      = null;
         objMessageInfo = null;
         oblClient      = null;
     }
 }
示例#9
0
 protected void linkButton_Click(object sender, EventArgs e)
 {
     cmdMode = CommandMode.N;
     ResetForm();
     updateSalesReturnedBdInfo.Update();
     this.ModalPopupExtender1.Show();
 }
示例#10
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtCityId.Text = dgvCity.DataKeys[gvrow.RowIndex].Value.ToString();
            txtCity.Text   = gvrow.Cells[0].Text;
            ddlCountry.SelectedItem.Selected = false;
            ddlCountry.Items.FindByText(gvrow.Cells[1].Text.ToString()).Selected = true;
            int idc = Convert.ToInt32(ddlCountry.SelectedValue);

            BindState(idc);
            ddlState.SelectedItem.Selected = false;
            ddlState.Items.FindByText(gvrow.Cells[3].Text.ToString()).Selected = true;
            int id = Convert.ToInt32(ddlState.SelectedValue);

            bindDistrict(id);
            ddlDistrict.SelectedItem.Selected = false;
            ddlDistrict.Items.FindByText(gvrow.Cells[2].Text.ToString()).Selected = true;

            updateCityBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#11
0
        protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
        {
            cmdMode = CommandMode.D;

            oblPurchaseOrder = new Store.PurchaseOrder.BusinessLogic.PurchaseOrder();
            objPurchaseOrder = new Store.PurchaseOrder.BusinessObject.PurchaseOrder();
            objMessageInfo   = new MessageInfo();
            try
            {
                ImageButton btndetails = sender as ImageButton;
                GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
                objPurchaseOrder.PurchaseOrderID = Convert.ToInt32(gvPOrder.DataKeys[gvrow.RowIndex].Value.ToString());
                objMessageInfo = oblPurchaseOrder.ManagePurchaseOrder(objPurchaseOrder, cmdMode);
                BindPurchaseOrder();
                if (objMessageInfo.TranID != 0)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
                }
                else if (objMessageInfo.ErrorCode == -101)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.ErrorMessage + "')", true);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objMessageInfo   = null;
                oblPurchaseOrder = null;
                objPurchaseOrder = null;
            }
        }
示例#12
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtPurchaseItemOrderID.Text           = dgvPurchaseItemOrder.DataKeys[gvrow.RowIndex].Value.ToString();
            ddlPurchaseOrderId.SelectedItem.Value = gvrow.Cells[0].Text;
            ddlPurchaseOrderId.SelectedItem.Value = gvrow.Cells[1].Text;
            ddlItemId.SelectedItem.Value          = gvrow.Cells[2].Text;
            txtItemUnit.Text    = gvrow.Cells[3].Text;
            txtDescription.Text = gvrow.Cells[4].Text;
            txtItemPrice.Text   = gvrow.Cells[5].Text;

            if (chkBoxIsActive.Checked)
            {
                objPurchaseOrderItem.IsActive = 0;
            }
            else
            {
                objPurchaseOrderItem.IsActive = 1;
            }


            updatePurchasedItemOrderBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#13
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode  = CommandMode.D;
     objStock = new Store.Stock.BusinessObject.Stock();
     oblStock = new Store.Stock.BusinessLogic.Stock();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objStock.StockID = Convert.ToInt32(dgvStock.DataKeys[gvrow.RowIndex].Value.ToString());
         objMessageInfo   = oblStock.ManageStockMaster(objStock, cmdMode);
         BindStock();
         updateStockBdInfo.Update();
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Stock).FullName, 1);
     }
     finally
     {
         objStock       = null;
         objMessageInfo = null;
         oblStock       = null;
     }
 }
示例#14
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode  = CommandMode.D;
     objState = new Store.State.BusinessObject.State();
     oblState = new Store.State.BusinessLogic.State();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objState.StateID   = Convert.ToInt32(dgvState.DataKeys[gvrow.RowIndex].Value.ToString());
         objState.StateName = "";
         //objState.CreatedBy = Convert.ToInt32(Session["UserId"].ToString());
         objMessageInfo = oblState.ManageItemMaster(objState, cmdMode);
         BindState();
         updateStateBdInfo.Update();
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(State).FullName, 1);
     }
     finally
     {
         objState       = null;
         objMessageInfo = null;
         oblState       = null;
     }
 }
示例#15
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtTypeofUserId.Text   = dgvTypeofUser.DataKeys[gvrow.RowIndex].Value.ToString();
            txtTypeofUserName.Text = gvrow.Cells[0].Text;
            updateTypeofUserBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#16
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtStockId.Text = dgvStock.DataKeys[gvrow.RowIndex].Value.ToString();
            ddlItemId.SelectedItem.Selected = false;
            ddlItemId.Items.FindByText(gvrow.Cells[0].Text.ToString()).Selected = true;
            txtQuantity.Text = gvrow.Cells[1].Text;
            updateStockBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#17
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtVendorID.Text          = dgvVendorInfo.DataKeys[gvrow.RowIndex].Value.ToString();
            txtVendorName.Text        = gvrow.Cells[0].Text;
            txtVendorDisplayName.Text = gvrow.Cells[1].Text;
            ddlTypeofVendorID.SelectedItem.Selected = false;
            ddlTypeofVendorID.Items.FindByText(gvrow.Cells[2].Text.ToString()).Selected = true;
            txtAddress.Text = gvrow.Cells[3].Text;
            ddlCountryID.SelectedItem.Selected = false;
            ddlCountryID.Items.FindByText(gvrow.Cells[4].Text.ToString()).Selected = true;
            int idc = Convert.ToInt32(ddlCountryID.SelectedValue);

            bindState(idc);
            ddlStateID.SelectedItem.Selected = false;
            ddlStateID.Items.FindByText(gvrow.Cells[5].Text.ToString()).Selected = true;
            int ids = Convert.ToInt32(ddlStateID.SelectedValue);

            bindCity(ids);
            ddlCityID.SelectedItem.Selected = false;
            ddlCityID.Items.FindByText(gvrow.Cells[6].Text.ToString()).Selected = true;
            txtPinID.Text          = gvrow.Cells[7].Text;
            txtConcernPerson.Text  = gvrow.Cells[8].Text;
            txtPhoneNo.Text        = gvrow.Cells[9].Text;
            txtMobileNo.Text       = gvrow.Cells[10].Text;
            txtEmailID.Text        = gvrow.Cells[11].Text;
            txtWebsiteAddress.Text = gvrow.Cells[12].Text;
            txtPanNo.Text          = gvrow.Cells[13].Text;
            txtGstNo.Text          = gvrow.Cells[14].Text;
            txtServiceTaxNo.Text   = gvrow.Cells[15].Text;
            int i = Convert.ToInt32(gvrow.Cells[13].Text);

            if (i == 1)
            {
                cbIsActive.Checked = true;
            }
            else
            {
                cbIsActive.Checked = false;
            }
            updateVendorBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#18
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode       = CommandMode.D;
     objVendorInfo = new Store.VendorInfo.BusinessObject.VendorInfo();
     oblVendorInfo = new Store.VendorInfo.BusinessLogic.VendorInfo();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objVendorInfo.VendorID          = Convert.ToInt32(dgvVendorInfo.DataKeys[gvrow.RowIndex].Value.ToString());
         objVendorInfo.VendorName        = "";
         objVendorInfo.VendorDisplayName = "";
         objVendorInfo.TypeofVendorID    = 0;
         objVendorInfo.Address           = "";
         objVendorInfo.CityID            = 0;
         objVendorInfo.StateID           = 0;
         objVendorInfo.CountryID         = 0;
         objVendorInfo.PinID             = 0;
         objVendorInfo.ConcernPerson     = 0;
         objVendorInfo.PhoneNo           = 0;
         objVendorInfo.MobileNo          = 0;
         objVendorInfo.EmailID           = "";
         objVendorInfo.WebsiteAddress    = "";
         objVendorInfo.PanNo             = "";
         objVendorInfo.GstNo             = "";
         objVendorInfo.ServiceTaxNo      = "";
         objVendorInfo.CreatedBy         = 1;
         objMessageInfo = oblVendorInfo.ManageItemMaster(objVendorInfo, cmdMode);
         BindVendorInfo();
         updateVendorBdInfo.Update();
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(VendorInfo).FullName, 1);
     }
     finally
     {
         objVendorInfo   = null;
         objMessageInfo  = null;
         oblTypeOfVendor = null;
     }
 }
示例#19
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtCategoryId.Text   = dgvCategory.DataKeys[gvrow.RowIndex].Value.ToString();
            txtCategoryName.Text = gvrow.Cells[0].Text;
            if (gvrow.Cells[0].Text != "")
            {
                cbParant.Checked = true;
                ddlCategory.SelectedItem.Selected = false;
                ddlCategory.Items.FindByText(gvrow.Cells[1].Text.ToString()).Selected = true;
                divCategory.Style.Add("display", "block");
            }
            updateCategoryBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#20
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode = CommandMode.D;
     objItem = new Store.Item.BusinessObject.Item();
     oblItem = new Store.Item.BusinessLogic.Item();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objItem.ItemID          = Convert.ToInt32(dgvItem.DataKeys[gvrow.RowIndex].Value.ToString());
         objItem.ItemPrefix      = "";
         objItem.ItemCode        = "";
         objItem.Barcode         = "";
         objItem.ItemDescription = "";
         objItem.ItemUnitId      = 1;
         objItem.CategoryID      = 1;
         //objItem.ItemCostPricePerUnit = 1;
         //objItem.ItemSalePricePerUnit = 1;
         //objItem.ItemDiscountPercentagePerUnit = 1;
         //objItem.WindowFrom = DateTime.Now;
         //objItem.WindowTo = DateTime.Now;
         //objItem.BatchNo = "";
         //objItem.CreatedBy = 1;
         objMessageInfo = oblItem.ManageItemMaster(objItem, cmdMode);
         BindItem();
         updateItemBdInfo.Update();
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Item).FullName, 1);
     }
     finally
     {
         objItem        = null;
         objMessageInfo = null;
         oblItem        = null;
     }
 }
示例#21
0
        protected void imgbtn_Click(object sender, ImageClickEventArgs e)
        {
            ResetForm();
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            txtClientId.Text                 = dgvClient.DataKeys[gvrow.RowIndex].Value.ToString();
            txtClientName.Text               = gvrow.Cells[0].Text;
            txtClientDisplayName.Text        = gvrow.Cells[1].Text;
            txtAddress.Text                  = gvrow.Cells[2].Text;
            ddlCountry.SelectedItem.Selected = false;
            ddlCountry.Items.FindByText(gvrow.Cells[3].Text.ToString()).Selected = true;
            int ids = Convert.ToInt32(ddlCountry.SelectedValue);

            bindState(ids);
            ddlState.SelectedItem.Selected = false;
            ddlState.Items.FindByText(gvrow.Cells[4].Text.ToString()).Selected = true;
            int idc = Convert.ToInt32(ddlState.SelectedValue);

            bindCity(idc);
            ddlCity.SelectedItem.Selected = false;
            ddlCity.Items.FindByText(gvrow.Cells[5].Text.ToString()).Selected = true;
            txtPinId.Text = gvrow.Cells[6].Text;
            int i = Convert.ToInt32(gvrow.Cells[7].Text);

            if (i == 1)
            {
                cbIsActive.Checked = true;
            }
            else
            {
                cbIsActive.Checked = false;
            }
            string txtStatus = gvrow.Cells[1].Text;

            updateClientBdInfo.Update();
            this.ModalPopupExtender1.Show();
            cmdMode = CommandMode.M;
        }
示例#22
0
        protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
        {
            cmdMode       = CommandMode.D;
            objSalesOrder = new Store.SalesOrder.BusinessObject.SalesOrder();
            odlSalesOrder = new Store.SalesOrder.BusinessLogic.SalesOrder();


            try
            {
                ImageButton btndetails = sender as ImageButton;
                GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
                objSalesOrder.SalesOrderID           = Convert.ToInt32(dgvSalesOrder.DataKeys[gvrow.RowIndex].Value.ToString());
                objSalesOrder.VendorID               = 0;
                objSalesOrder.SaleDate               = DateTime.Now;
                objSalesOrder.TotalCostAmount        = 0;
                objSalesOrder.TotalSaleAmount        = 0;
                objSalesOrder.TotalTaxValue          = 0;
                objSalesOrder.TotalDiscountAmount    = 0;
                objSalesOrder.ShipingAndHandlingCost = 0;
                objSalesOrder.MiscSaleAmount         = 0;
                objSalesOrder.IsActive               = 1;
                objSalesOrder.ClientID               = 0;
                objSalesOrder.CreatedBy              = 1;
                objMessageInfo = odlSalesOrder.ManageItemMaster(objSalesOrder, cmdMode);
                BindSalesOrder();
                updateSalesOrderBdInfo.Update();
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objSalesOrder  = null;
                objMessageInfo = null;
                odlSalesOrder  = null;
            }
        }
示例#23
0
        protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
        {
            cmdMode           = CommandMode.D;
            objSalesOrderItem = new Store.SalesOrderItem.BusinessObject.SalesOrderItem();
            oblSalesOrderItem = new Store.SalesOrderItem.BusinessLogic.SalesOrderItem();


            try
            {
                ImageButton btndetails = sender as ImageButton;
                GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
                objSalesOrderItem.SaleOrderItemID        = Convert.ToInt32(dgvSaleOrderItem.DataKeys[gvrow.RowIndex].Value.ToString());
                objSalesOrderItem.SalesOrderID           = 0;
                objSalesOrderItem.ItemId                 = 0;
                objSalesOrderItem.ItemUnit               = "";
                objSalesOrderItem.Description            = "";
                objSalesOrderItem.ItemCostPrice          = 0;
                objSalesOrderItem.ItemSalePrice          = 0;
                objSalesOrderItem.ItemDiscountPercentage = 0;
                objSalesOrderItem.ItemDiscount           = 0;
                objSalesOrderItem.CreatedBy              = 1;
                objMessageInfo = oblSalesOrderItem.ManageItemMaster(objSalesOrderItem, cmdMode);
                BindSalesOrderItem();
                updateSaleOrderItemBdInfo.Update();
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objSalesOrderItem = null;
                objMessageInfo    = null;
                oblSalesOrderItem = null;
            }
        }