void BindVendorInfo() { oblVendorInfo = new Store.VendorInfo.BusinessLogic.VendorInfo(); try { objVendorInfoList = oblVendorInfo.GetAllVendorInfoList(0, 0, ""); if (objVendorInfoList != null) { dgvVendorInfo.DataSource = objVendorInfoList; dgvVendorInfo.DataBind(); } else { dgvVendorInfo.DataSource = null; dgvVendorInfo.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(POrder).FullName, 1); } finally { oblVendorInfo = null; objVendorInfoList = null; } updateSupplierBdInfo.Update(); this.mpopVendor.Show(); }
void BindVendorInfo(int id) { oblVendorInfo = new Store.VendorInfo.BusinessLogic.VendorInfo(); try { objVendorInfo = oblVendorInfo.GetAllVendorInfo(id, 0, ""); if (objVendorInfo != null) { hfVendor.Value = objVendorInfo.VendorID.ToString(); txtVendor.Text = objVendorInfo.VendorName; txtAddress.Text = objVendorInfo.Address; txtCountry.Text = objVendorInfo.CountryName; txtState.Text = objVendorInfo.StateName; txtCity.Text = objVendorInfo.CityName; txtPin.Text = objVendorInfo.PinID.ToString(); txtMobile.Text = objVendorInfo.MobileNo.ToString(); txtEmail.Text = objVendorInfo.EmailID; } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(PReceived).FullName, 1); } finally { oblVendorInfo = null; objVendorInfo = null; } }
void ManageVendorInfo() { objVendorInfo = new Store.VendorInfo.BusinessObject.VendorInfo(); oblVendorInfo = new Store.VendorInfo.BusinessLogic.VendorInfo(); try { if (cmdMode == Store.Common.CommandMode.M) { objVendorInfo.VendorID = Convert.ToInt32(txtVendorID.Text); //objVendorInfo.ModifiedBy = Convert.ToInt32(Session["VendorId"]); } else { objVendorInfo.VendorID = 0; //objVendorInfo.CreatedBy = Convert.ToInt32(Session["VendorId"]); } objVendorInfo.VendorName = Convert.ToString(txtVendorName.Text); objVendorInfo.VendorDisplayName = Convert.ToString(txtVendorDisplayName.Text); objVendorInfo.TypeofVendorID = Convert.ToInt32(ddlTypeofVendorID.SelectedItem.Value); objVendorInfo.Address = Convert.ToString(txtAddress.Text); objVendorInfo.CityID = Convert.ToInt32(ddlCityID.SelectedItem.Value); objVendorInfo.StateID = Convert.ToInt32(ddlStateID.SelectedItem.Value); objVendorInfo.CountryID = Convert.ToInt32(ddlCountryID.SelectedItem.Value); objVendorInfo.PinID = Convert.ToInt32(txtPinID.Text); objVendorInfo.ConcernPerson = Convert.ToInt32(txtConcernPerson.Text); objVendorInfo.PhoneNo = Convert.ToInt32(txtPhoneNo.Text); objVendorInfo.MobileNo = Convert.ToInt32(txtMobileNo.Text); objVendorInfo.EmailID = Convert.ToString(txtEmailID.Text); objVendorInfo.WebsiteAddress = Convert.ToString(txtWebsiteAddress.Text); objVendorInfo.PanNo = Convert.ToString(txtPanNo.Text); objVendorInfo.GstNo = Convert.ToString(txtGstNo.Text); objVendorInfo.ServiceTaxNo = Convert.ToString(txtServiceTaxNo.Text); if (cbIsActive.Checked) { objVendorInfo.IsActive = 1; } else { objVendorInfo.IsActive = 0; } objMessageInfo = oblVendorInfo.ManageItemMaster(objVendorInfo, cmdMode); } 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; oblVendorInfo = null; } }
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; } }