예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string warehouseName = WarehouseBLL.GetWarehouseNameById(UserBLL.GetCurrentWarehouse());

            this.lblWN.Text = warehouseName;

            //str.Append("<table  align='center' border='1' bordercolor='#00aeef' width='99%' class='reporttable1' cellspacing='0' cellpadding='0' style='font-size:10;'>");
            //str.Append("<tr>");
            //str.Append("<td>");
            //str.Append("<b>S.No</b>");
            //str.Append("</td>");
            //str.Append("<td>");
            //str.Append("<b>Name</b>");
            //str.Append("</td>");
            //str.Append("</tr>");
            //str.Append("<tr>");
            //str.Append("<td>");
            //str.Append("1");
            //str.Append("</td>");
            //str.Append("<td>");
            //str.Append("Shubhang Mathur");
            //str.Append("</td>");
            //str.Append("</tr>");
            //str.Append("<tr>");
            //str.Append("<td>");
            //str.Append("2");
            //str.Append("</td>");
            //str.Append("<td>");
            //str.Append("Shubhang Sahai Mathur");
            //str.Append("</td>");
            //str.Append("</tr>");
            //str.Append("</table>".ToString());
        }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //string lblLoggedUser = HttpContext.Current.User.Identity.Name.Remove(0, HttpContext.Current.User.Identity.Name.LastIndexOf(@"\") + 1);
     //if ((this.Session["LoggedUser"] == null && this.Session["LoggedUserName"] == null) ||
     //    (this.Session["LoggedUser"] != null && this.Session["LoggedUserName"] != null && this.Session["LoggedUserName"].ToString() != lblLoggedUser))
     //{
     //    Guid? UserGuid = UserBLL.GetUser(lblLoggedUser);
     //    if (UserGuid == null)
     //    {
     //        FormsAuthentication.SignOut();
     //        Response.Redirect(ConfigurationManager.AppSettings["lbLoggoffISAURL"]);
     //    }
     //    else
     //    {
     //        this.Session["LoggedUser"] = UserGuid;
     //        this.Session["LoggedUserName"] = lblLoggedUser;
     //    }
     //}
     this.Page.Title = "ECX Warehouse Application";
     //LOAD WAREHOUSE
     lblWarehouse.Text = WarehouseBLL.GetWarehouseNameById(new Guid(UserBLL.GetCurrentWarehouse().ToString())).ToUpper() + " Warehouse".ToUpper();
     lblUserName.Text  = UserBLL.GetName(UserBLL.GetCurrentUser());
 }
예제 #3
0
        private void rptGRN_ReportStart(object sender, EventArgs e)
        {
            if (HttpContext.Current.Session["GRNIDPrint"] == null)
            {
                throw new Exception("Session expired");
            }
            Guid GRNId = Guid.Empty;

            GRNId = new Guid(HttpContext.Current.Session["GRNIDPrint"].ToString());
            Guid   GradingId = Guid.Empty;
            GRNBLL objGRN    = new GRNBLL();

            objGRN              = objGRN.GetbyGRN_Number(GRNId);
            GradingId           = objGRN.GradingId;
            this.lblGRN_No.Text = objGRN.GRN_Number;
            this.lblClient.Text = ClientBLL.GetClinetNameById(objGRN.ClientId);

            this.lblCommodityGrade.Text   = CommodityGradeBLL.GetCommodityGradeNameById(objGRN.CommodityGradeId);
            this.lblWarehouse.Text        = WarehouseBLL.GetWarehouseNameById(objGRN.WarehouseId);
            this.lblOriginalQuantity.Text = objGRN.OriginalQuantity.ToString();
            this.lblNetWeight.Text        = objGRN.NetWeight.ToString();
            this.lblDateDeposited.Text    = objGRN.DateDeposited.ToShortDateString();
            this.lblTimeDeposited.Text    = objGRN.DateDeposited.ToShortTimeString();
            this.lblNoBags.Text           = objGRN.TotalNumberOfBags.ToString();
            //Bag Type
            BagTypeBLL objBt = new BagTypeBLL();

            objBt.GetBagTypeById(objGRN.BagTypeId);
            lblBagType.Text = objBt.BagTypeName;

            //Driver Information

            List <DriverInformationBLL> list  = null;
            DriverInformationBLL        objDI = new DriverInformationBLL();

            list = objDI.GetActiveDriverInformationByReceivigRequestId(objGRN.CommodityRecivingId);
            if (list != null)
            {
                string driverName          = "";
                string plateNo             = "";
                string driverLicense       = "";
                string licensceIssuedPlace = "";
                foreach (DriverInformationBLL o in list)
                {
                    if (driverName == "")
                    {
                        driverName = o.DriverName;
                    }
                    else
                    {
                        driverName += "," + o.DriverName;
                    }
                    if (plateNo == "")
                    {
                        if (String.IsNullOrEmpty(o.TrailerPlateNumber) != true)
                        {
                            plateNo = o.PlateNumber + "-" + o.TrailerPlateNumber;
                        }
                        else
                        {
                            plateNo = o.PlateNumber;
                        }
                    }
                    else
                    {
                        if (String.IsNullOrEmpty(o.TrailerPlateNumber) != true)
                        {
                            plateNo += " , " + o.PlateNumber + "-" + o.TrailerPlateNumber;
                        }
                        else
                        {
                            plateNo += " , " + o.PlateNumber;
                        }
                    }
                    if (driverLicense == "")
                    {
                        driverLicense = o.LicenseNumber;
                    }
                    else
                    {
                        driverLicense += " , " + o.LicenseNumber;
                    }
                    if (licensceIssuedPlace == "")
                    {
                        licensceIssuedPlace = o.LicenseIssuedPlace;
                    }
                    else
                    {
                        licensceIssuedPlace += " , " + o.LicenseIssuedPlace;
                    }
                }
                this.lblDriverName.Text    = driverName;
                this.lblPlateNo.Text       = plateNo;
                this.lblDriverLicense.Text = driverLicense;
                this.lblPlaceIssued.Text   = licensceIssuedPlace;
            }
            // Scaling
            ScalingBLL objScaling = new ScalingBLL();

            objScaling = objScaling.GetById(objGRN.ScalingId);
            if (objScaling != null)
            {
                if (objScaling.WeigherId != null)
                {
                    try
                    {
                        this.lblWeigherName.Text = UserRightBLL.GetUserNameByUserId(objScaling.WeigherId);
                    }
                    catch
                    {
                    }
                }
            }
            // Sampler
            SamplerBLL objSampler = new SamplerBLL();

            objSampler = objSampler.GetActiveSamplingSupBySamplingId(objGRN.SamplingTicketId);
            if (objSampler != null)
            {
                this.lblSampler.Text = UserRightBLL.GetUserNameByUserId(objSampler.SamplerId);
            }
            //Graders
            GradingByBLL objGrader = new GradingByBLL();

            this.lblGrader.Text = objGrader.GetSupGraderNameByGradingId(objGRN.GradingId);

            if (objGRN.ApprovedBy != null)
            {
                try
                {
                    this.lblApprovedBy.Text = UserRightBLL.GetUserNameByUserId(objGRN.ApprovedBy);
                }
                catch
                {
                }
            }
            if (objGRN.ApprovedTimeStamp != null)
            {
                this.lblDateAproved.Text = objGRN.ApprovedTimeStamp.ToShortDateString();
            }
            rpt   = new rptGrading(GradingId);
            rptGS = new rptGRNService(GRNId);
            this.txtDateGenerated.Text = DateTime.Now.ToString();
            ScalingBLL objSacling = new ScalingBLL();

            objSacling = objSacling.GetById(objGRN.ScalingId);
            if (objSacling != null)
            {
                this.lblScaleTicketNo.Text = objSacling.ScaleTicketNumber;
            }

            this.subReport1.Report = rpt;
            this.subReport2.Report = this.rptGS;
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string warehouseName = WarehouseBLL.GetWarehouseNameById(UserBLL.GetCurrentWarehouse());

            this.lblWN.Text = warehouseName;
        }