public frmStandardCostingReport()
        {
            InitializeComponent();
            err      = new ErrorProviderExtended();
            yearbal  = new YearBAL();
            signabal = new SignatoryBAL();

            signalist          = new List <tbl_SIGNATORY>();
            signalist_existing = new List <tbl_SIGNATORY>();
            signa = new tbl_SIGNATORY();

            itmbal = new ItemBAL();
            itm    = new tbl_000_H_ITEM();
        }
        private void AssignRecord(Boolean IsSave)
        {
            try
            {
                if (IsSave)
                {
                    string apprtag = "APPRD";
                    string preptag = "PREPRD";
                    string revitag = "REVWD";
                    signalist = new List <tbl_SIGNATORY>();

                    //Approved By
                    signa              = new tbl_SIGNATORY();
                    signa.RecID        = minid;
                    signa.SignName     = BPSUtilitiesV1.NZ(mtxtApprName1.Text, "").ToString();
                    signa.SignPosition = BPSUtilitiesV1.NZ(mtxtApprPosition1.Text, "").ToString();
                    signa.SignFor      = apprtag;
                    signalist.Add(signa);

                    signa              = new tbl_SIGNATORY();
                    signa.RecID        = minid + 1;
                    signa.SignName     = BPSUtilitiesV1.NZ(mtxtApprName2.Text, "").ToString();
                    signa.SignPosition = BPSUtilitiesV1.NZ(mtxtApprPosition2.Text, "").ToString();
                    signa.SignFor      = apprtag;
                    signalist.Add(signa);

                    //Prepared By
                    signa              = new tbl_SIGNATORY();
                    signa.RecID        = minid + 2;
                    signa.SignName     = BPSUtilitiesV1.NZ(mtxtPrepName1.Text, "").ToString();
                    signa.SignPosition = BPSUtilitiesV1.NZ(mtxtPrepPosition1.Text, "").ToString();
                    signa.SignFor      = preptag;
                    signalist.Add(signa);

                    signa              = new tbl_SIGNATORY();
                    signa.RecID        = minid + 3;
                    signa.SignName     = BPSUtilitiesV1.NZ(mtxtPrepName2.Text, "").ToString();
                    signa.SignPosition = BPSUtilitiesV1.NZ(mtxtPrepPosition2.Text, "").ToString();
                    signa.SignFor      = preptag;
                    signalist.Add(signa);

                    //Reviewed By
                    signa              = new tbl_SIGNATORY();
                    signa.RecID        = minid + 4;
                    signa.SignName     = BPSUtilitiesV1.NZ(mtxtReviName1.Text, "").ToString();
                    signa.SignPosition = BPSUtilitiesV1.NZ(mtxtReviPosition1.Text, "").ToString();
                    signa.SignFor      = revitag;
                    signalist.Add(signa);

                    signa              = new tbl_SIGNATORY();
                    signa.RecID        = minid + 5;
                    signa.SignName     = BPSUtilitiesV1.NZ(mtxtReviName2.Text, "").ToString();
                    signa.SignPosition = BPSUtilitiesV1.NZ(mtxtReviPosition2.Text, "").ToString();
                    signa.SignFor      = revitag;
                    signalist.Add(signa);

                    foreach (tbl_SIGNATORY s in signalist)
                    {
                        s.ReportName  = this.Text;
                        s.UpdatedBy   = UserSettings.Username;
                        s.UpdatedDate = DateTime.Now;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }