Beispiel #1
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Shopping.Title;

            // if an ingred rno passed in then well setup for a new receipt for the ingredient on today with No Vendor
            NewIngredRno = Parm.Int("IngredRno");
            if (NewIngredRno != 0)
            {
                IngredReceipt(NewIngredRno);
                LoadList();
                hfTab.Value = "1";
            }
            else
            {
                Setup();
            }
        }
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Accounting.Title;
            //Setup();
        }
        else
        {
            DateTime Tm = DateTime.Now;

            // Paid In Full jobs
            int Count = Str.Num(Request.Params["Count"]);
            for (int i = 1; i <= Count; i++)
            {
                int JobRno = Str.Num(Request.Params["chkProc" + i]);
                if (JobRno > 0)
                {
                    string Sql = "Update mcJobs Set " +
                                 "PaidInFullDtTm = " + DB.PutDtTm(Tm) + ", " +
                                 "PaidInFullUser = "******", " +
                                 "UpdatedDtTm = " + DB.PutDtTm(Tm) + ", " +
                                 "UpdatedUser = "******" " +
                                 "Where JobRno = " + JobRno;
                    db.Exec(Sql);
                }
            }
        }
    }
Beispiel #3
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));
        JobRno = Pg.JobRno();

        pnlPreview.CssClass = "PdfPreview";

        //pnlPreview.Visible = false;

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Jobs.Title;
        }
        else
        {
            if (hfEmail.Value == "true")
            {
                SaveAttachment();
                SendEmail();
            }
        }
    }
Beispiel #4
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();
        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Setup();
        }
    }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.MenuSetup.Title;
            Setup();
        }
    }
Beispiel #6
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.JobSetup.Title;
        }
        else
        {
            SaveUpdates();
        }
    }
Beispiel #7
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Recipes.Title;
        }

        RecipeRno = Parm.Int("Rno");

        Scale();
    }
Beispiel #8
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Reports.Title;
            Setup();
        }
        //WebConfig wc = new WebConfig();
        //SlingEmail = wc.Str("SlingEmail");
        //SlingPassword = wc.Str("SlingPassword");
        //SlingOrgId = wc.Str("SlingOrgId");
    }
Beispiel #9
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));
        JobRno = Pg.JobRno();

        cServices     = Str.Num(txtcServices.Text);
        cShowServices = Str.Num(txtcShowServices.Text);
        AddLines();

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Jobs.Title;
            Setup();
        }
    }
Beispiel #10
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        if (Request.QueryString["JobRno"] != null)
        {
            string sJobRno = Request.QueryString["JobRno"];
            JobRno = Misc.UnMangleNumber(sJobRno);
            if (JobRno == 0)
            {
                JobRno = Str.Num(sJobRno);
            }
            if (JobRno != 0)
            {
                fReport    = true;
                fSingleJob = true;
            }
        }

        Pg = new WebPage("Images");
        if (JobRno == 0)
        {
            Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));
        }

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Reports.Title;
            Setup();
        }
        else
        {
            fLetterSize = rdoLetter.Checked;
        }

        //WebConfig wc = new WebConfig();
        //// has to be the system parm sling user so we can see the pending assignments
        SlingEmail    = SysParm.Get(Misc.cnSlingUserEmail);
        SlingPassword = SysParm.Get(Misc.cnSlingUserPassword);
        //SlingOrgId = wc.Str("SlingOrgId");
    }
Beispiel #11
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Session["Menu"] = WebPage.MenuSetup.Title;
        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            ClearData();
            Setup();

            // handle a particular menu item being edited
            int MenuItemRno = Parm.Int("Rno");
            if (MenuItemRno != 0)
            {
                GetData(MenuItemRno);
            }
        }
    }
Beispiel #12
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Contacts.Title;

            int Rno = Str.Num((string)Request.QueryString["ContactRno"]);
            if (Rno != 0)
            {
                fStartHere = true;
                StartHere  = Rno.ToString();
            }

            FillCustomers();
            Setup();
        }
    }
Beispiel #13
0
    private async void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Sling.Title;

            try
            {
                await LoadData();
            }
            catch (Exception Ex)
            {
                Err Err = new Err(Ex);
                Response.Write(Err.Html());
            }
        }
    }
Beispiel #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        db = new DB();

        Session["Menu"] = WebPage.MenuSetup.Title;
        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            tblRpt.Visible = false;

            string Sql = "Select QuoteDiffPct From Settings";
            try
            {
                decimal DiffPct = db.SqlDec(Sql);
                if (DiffPct == 0)
                {
                    DiffPct = 15;
                }

                txtDiffPct.Text = Fmt.Num(DiffPct, 0);
            }
            catch (Exception Ex)
            {
                Err Err = new Err(Ex, Sql);
                Response.Write(Err.Html());
            }
        }
        else
        {
            tblRpt.Visible = true;
            fields.Visible = false;
            ProcessReport();
        }
    }
Beispiel #15
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));
        JobRno = Pg.JobRno();

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Jobs.Title;
            //cItems = Str.Num(hfNumItems.Value);
            //cItems = Str.Num(txtcItems.Text);
            //AddLines();

            // setup the food category/item list
            Setup();
        }
        else
        {
            //Update();
        }
    }
Beispiel #16
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Shopping.Title;
            //Setup();

            string Sql = string.Empty;
            try
            {
                // ingredient without a receipt price
                Sql =
                    "Select IngredRno, Name From Ingredients " +
                    "Where IsNull(HideFlg, 0) = 0 " +
                    "And IsNull(NonPurchaseFlg, 0) = 0 " +
                    "And IngredRno Not In (Select Distinct IngredRno From PurchaseDetails Where IngredRno Is Not Null) " +
                    "And IngredRno In (Select IngredRno From RecipeIngredXref) " +
                    "Order By Name";
                DataTable dt = db.DataTable(Sql);
                foreach (DataRow dr in dt.Rows)
                {
                    int IngredRno = DB.Int32(dr["IngredRno"]);

                    HtmlTableRow  tr = new HtmlTableRow();
                    HtmlTableCell td = new HtmlTableCell();
                    td.InnerText = DB.Str(dr["Name"]);
                    tr.Controls.Add(td);

                    td = new HtmlTableCell();
                    HtmlAnchor a = new HtmlAnchor();
                    a.HRef      = string.Format("Purchases.aspx?IngredRno={0}", DB.Int32(dr["IngredRno"]));
                    a.InnerText = "Enter Receipt";
                    a.Attributes.Add("title", "Go to the Receipt page to enter a price.");
                    a.Target = "Fix";
                    td.Controls.Add(a);
                    td.Attributes.Add("class", "select");
                    tr.Controls.Add(td);

                    // non-purchase
                    td = new HtmlTableCell();
                    CheckBox chk = new CheckBox();
                    chk.CssClass = "set-non-purchase";
                    chk.ToolTip  = "Set Ingredient as Non-Purchased";
                    chk.Attributes.Add("data-ingredient-rno", IngredRno.ToString());
                    td.Controls.Add(chk);
                    // edit ingredient icon
                    a        = new HtmlAnchor();
                    a.HRef   = string.Format("Ingredients.aspx?Rno={0}", IngredRno);
                    a.Target = "Fix";
                    HtmlGenericControl i = new HtmlGenericControl("i");
                    i.Attributes.Add("class", "icon-edit");
                    i.Attributes.Add("title", "Edit this ingredient");
                    a.Controls.Add(i);
                    td.Controls.Add(a);
                    tr.Controls.Add(td);
                    tblIngreds.Rows.Add(tr);
                }
                divIngreds.Visible = (dt.Rows.Count > 0);


                // ingredient purchase units
                Sql =
                    "Select i.IngredRno, i.Name, x.UnitRno, d.PurchaseUnitRno, " +
                    "(Select UnitSingle From Units Where UnitRno = x.UnitRno) As Unit, " +
                    "(Select UnitSingle From Units Where UnitRno = d.PurchaseUnitRno) As PurchaseUnit " +
                    "From RecipeIngredXref x " +
                    "Inner Join PurchaseDetails d On d.IngredRno = x.IngredRno And d.PurchaseRno = (Select Max(PurchaseRno) From PurchaseDetails Where IngredRno = x.IngredRno) " +
                    "Inner Join Recipes r On r.RecipeRno = x.RecipeRno " +
                    "Inner Join Ingredients i On i.IngredRno = x.IngredRno " +
                    "Where x.UnitRno <> d.PurchaseUnitRno " +
                    "And IsNull(r.HideFlg, 0) = 0 " +
                    "And IsNull(i.MenuItemAsIsFlg, 0) = 0 " +
                    "Group By i.Name, x.UnitRno, i.IngredRno, d.PurchaseUnitRno " +
                    "Order By i.Name";
                dt = db.DataTable(Sql);
                Ingred Ingred    = new Ingred(0);
                int    cProblems = 0;
                foreach (DataRow dr in dt.Rows)
                {
                    int IngredRno = DB.Int32(dr["IngredRno"]);
                    Ingred = new Ingred(IngredRno);
                    decimal ConversionScaler = Ingred.ConversionScaler(DB.Int32(dr["UnitRno"]), DB.Int32(dr["PurchaseUnitRno"]));
                    if (ConversionScaler == 0)
                    {
                        cProblems++;
                        HtmlTableRow  tr = new HtmlTableRow();
                        HtmlTableCell td = new HtmlTableCell();
                        HtmlAnchor    a  = new HtmlAnchor();
                        a.HRef      = string.Format("Ingredients.aspx?Rno={0}", IngredRno);
                        a.InnerText = DB.Str(dr["Name"]);
                        a.Target    = "Fix";
                        td.Controls.Add(a);
                        tr.Controls.Add(td);

                        td           = new HtmlTableCell();
                        td.InnerText = DB.Str(dr["Unit"]);;
                        tr.Controls.Add(td);

                        td           = new HtmlTableCell();
                        td.InnerText = DB.Str(dr["PurchaseUnit"]);;
                        tr.Controls.Add(td);

                        tblPurchaseUnits.Rows.Add(tr);
                    }
                }
                divPurchaseUnits.Visible = (cProblems > 0);
            }
            catch (Exception Ex)
            {
                Err Err = new Err(Ex, Sql);
                Response.Write(Err.Html());
            }
        }
    }
Beispiel #17
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Recipes.Title;
            //Setup();

            string Sql = string.Empty;
            try
            {
                // get list of recipes for menu items
                Sql = "Select Name, RecipeRno From Recipes Where IsNull(HideFlg, 0) = 0 Order By Name";
                DataTable dtRecipes = db.DataTable(Sql);

                // menu item with a recipe or marked As Is
                Sql =
                    "Select MenuItemRno, Category, MenuItem " +
                    "From mcJobMenuItems " +
                    "Where RecipeRno Is Null " +
                    "And IsNull(HideFlg, 0) = 0 " +
                    "And IsNull(AsIsFlg, 0) = 0 " +
                    "And MenuItem <> '' " +
                    "And Category <> '' " +
                    "And Category In (Select Category From mcJobMenuCategories Where IsNull(HideFlg, 0) = 0) " +
                    "Order By MenuItem, Category";
                DataTable dt = db.DataTable(Sql);
                foreach (DataRow dr in dt.Rows)
                {
                    int MenuItemRno = DB.Int32(dr["MenuItemRno"]);

                    // category
                    HtmlTableRow  tr = new HtmlTableRow();
                    HtmlTableCell td = new HtmlTableCell();
                    td.InnerText = DB.Str(dr["Category"]);
                    td.Attributes.Add("class", "category");
                    tr.Controls.Add(td);

                    // menu item
                    td = new HtmlTableCell();
                    td.Attributes.Add("class", "menu-item");
                    td.Attributes.Add("data-name", DB.Str(dr["MenuItem"]));
                    td.InnerText = DB.Str(dr["MenuItem"]);
                    tr.Controls.Add(td);

                    // Hide
                    td = new HtmlTableCell();
                    CheckBox chk = new CheckBox();
                    chk.CssClass = "set-as-hidden";
                    chk.ToolTip  = "Hide this menu item";
                    chk.Attributes.Add("data-item-menu-rno", MenuItemRno.ToString());
                    td.Controls.Add(chk);
                    tr.Controls.Add(td);

                    // as is
                    td           = new HtmlTableCell();
                    chk          = new CheckBox();
                    chk.CssClass = "mark-as-is";
                    chk.ToolTip  = "Set menu item As Is";
                    chk.Attributes.Add("data-item-menu-rno", MenuItemRno.ToString());
                    td.Controls.Add(chk);
                    // edit menu item icon
                    HtmlAnchor a = new HtmlAnchor();
                    a.HRef   = string.Format("SetupMenuItems.aspx?Rno={0}", MenuItemRno);
                    a.Target = "Fix";
                    HtmlGenericControl i = new HtmlGenericControl("i");
                    i.Attributes.Add("class", "icon-edit");
                    i.Attributes.Add("title", "Edit the menu item");
                    a.Controls.Add(i);
                    td.Controls.Add(a);
                    tr.Controls.Add(td);

                    // recipe
                    td = new HtmlTableCell();
                    HtmlGenericControl s = new  HtmlGenericControl("select");
                    s.Attributes.Add("class", "select-recipe");
                    s.Attributes.Add("data-item-menu-rno", MenuItemRno.ToString());
                    HtmlGenericControl o = new HtmlGenericControl("option");
                    o.InnerText = "Select Recipe";
                    o.Attributes.Add("value", "0");
                    o.Attributes.Add("style", "color: #888;");
                    s.Controls.Add(o);
                    foreach (DataRow drRecipe in dtRecipes.Rows)
                    {
                        o           = new HtmlGenericControl("option");
                        o.InnerText = DB.Str(drRecipe["Name"]);
                        o.Attributes.Add("value", DB.Int32(drRecipe["RecipeRno"]).ToString());
                        s.Controls.Add(o);
                    }
                    td.Controls.Add(s);
                    a        = new HtmlAnchor();
                    a.HRef   = "Recipes.aspx";
                    a.Target = "Fix";
                    i        = new HtmlGenericControl("i");
                    i.Attributes.Add("class", "icon-edit");
                    i.Attributes.Add("title", "Create a recipe for this menu item.");
                    a.Controls.Add(i);
                    td.Controls.Add(a);
                    td.Attributes.Add("class", "select");
                    tr.Controls.Add(td);


                    tblMenuItems.Rows.Add(tr);
                }
                divMenuItems.Visible = (dt.Rows.Count > 0);


                // subrecipe with mismatched units
                Sql =
                    "Select r.RecipeRno, r.Name As RecipeName, sr.Name As SubrecipeName, x.SubrecipeRno, x.UnitRno, sr.YieldUnitRno, " +
                    "(Select UnitSingle From Units Where UnitRno = x.UnitRno) As Unit, " +
                    "(Select UnitSingle From Units Where UnitRno = sr.YieldUnitRno) As YieldUnit " +
                    "From RecipeIngredXref x " +
                    "Inner Join Recipes sr On sr.RecipeRno = x.SubrecipeRno " +
                    "Inner Join Recipes r On r.RecipeRno = x.RecipeRno " +
                    "Where SubrecipeRno Is Not Null " +
                    "And x.UnitRno <> sr.YieldUnitRno " +
                    "And IsNull(r.HideFlg, 0) = 0 " +
                    "Order By r.Name, sr.Name";
                dt = db.DataTable(Sql);
                Ingred Ingred    = new Ingred(0);
                int    cProblems = 0;
                foreach (DataRow dr in dt.Rows)
                {
                    decimal ConversionScaler = Ingred.ConversionScaler(DB.Int32(dr["UnitRno"]), DB.Int32(dr["YieldUnitRno"]));
                    if (ConversionScaler == 0)
                    {
                        cProblems++;
                        HtmlTableRow  tr = new HtmlTableRow();
                        HtmlTableCell td = new HtmlTableCell();
                        HtmlAnchor    a  = new HtmlAnchor();
                        a.HRef      = string.Format("Recipes.aspx?Rno={0}", DB.Int32(dr["RecipeRno"]));
                        a.InnerText = DB.Str(dr["RecipeName"]);
                        a.Target    = "Fix";
                        td.Controls.Add(a);
                        tr.Controls.Add(td);

                        td           = new HtmlTableCell();
                        td.InnerText = DB.Str(dr["Unit"]);;
                        tr.Controls.Add(td);

                        td           = new HtmlTableCell();
                        td.InnerText = DB.Str(dr["YieldUnit"]);;
                        tr.Controls.Add(td);

                        td           = new HtmlTableCell();
                        td.InnerText = DB.Str(dr["SubrecipeName"]);;
                        tr.Controls.Add(td);

                        tblSubrecipe.Rows.Add(tr);
                    }
                }
                divSubrecipe.Visible = (cProblems > 0);


                // zero servings recipes
                Sql =
                    "Select RecipeRno, Name From Recipes Where IsNull(NumServings, 0) = 0 " +
                    "And IsNull(SubrecipeFlg, 0) = 0 " +
                    "And IsNull(HideFlg, 0) = 0 " +
                    "Order By Name";
                dt = db.DataTable(Sql);
                foreach (DataRow dr in dt.Rows)
                {
                    HtmlTableRow  tr = new HtmlTableRow();
                    HtmlTableCell td = new HtmlTableCell();
                    HtmlAnchor    a  = new HtmlAnchor();
                    a.HRef      = string.Format("Recipes.aspx?Rno={0}", DB.Int32(dr["RecipeRno"]));
                    a.InnerText = DB.Str(dr["Name"]);
                    a.Target    = "Fix";
                    td.Controls.Add(a);
                    tr.Controls.Add(td);

                    tblRecipes.Rows.Add(tr);
                }
                divRecipes.Visible = (dt.Rows.Count > 0);
            }
            catch (Exception Ex)
            {
                Err Err = new Err(Ex, Sql);
                Response.Write(Err.Html());
            }
        }
    }
Beispiel #18
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        db = new DB();

        Pg = new WebPage("Images");
        Pg.CheckLogin(Path.GetFileNameWithoutExtension(Page.AppRelativeVirtualPath));

        // Put user code to initialize the page here
        if (!Page.IsPostBack)
        {
            Session["Menu"] = WebPage.Accounting.Title;
            //Setup();
        }
        else
        {
            DateTime Tm = DateTime.Now;

            // Recently edited finalized jobs
            int Count = Str.Num(Request.Params["ReCount"]);
            for (int i = 1; i <= Count; i++)
            {
                int JobRno = Str.Num(Request.Params["chkReProc" + i]);
                if (JobRno > 0)
                {
                    //string Sql = "Select CCNum1, CCNum2, CCNum3 From mcJobs Where JobRno = " + JobRno;
                    //DataRow dr = db.DataRow(Sql);
                    //string CCNum1 = DecryptCCNum(dr, "1");
                    //string CCNum2 = DecryptCCNum(dr, "2");
                    //string CCNum3 = DecryptCCNum(dr, "3");
                    //if (CCNum1.Length > 0)
                    //{
                    //	CCNum1 = "x" + Str.Right(CCNum1, 4);
                    //}
                    //if (CCNum2.Length > 0)
                    //{
                    //	CCNum2 = "x" + Str.Right(CCNum2, 4);
                    //}
                    //if (CCNum3.Length > 0)
                    //{
                    //	CCNum3 = "x" + Str.Right(CCNum3, 4);
                    //}

                    string Sql = "Update mcJobs Set " +
                                 "EditProcessedDtTm = Null, " +
                                 "EditProcessedUser = Null, " +
                                 //"CCSecCode1 = Null, CCSecCode2 = Null, CCSecCode3 = Null, " +
                                 //"CCNum1 = " + DB.PutStr(CCNum1) + ", " +
                                 //"CCNum2 = " + DB.PutStr(CCNum2) + ", " +
                                 //"CCNum3 = " + DB.PutStr(CCNum3) + ", " +
                                 "UpdatedDtTm = " + DB.PutDtTm(Tm) + ", " +
                                 "UpdatedUser = "******" " +
                                 "Where JobRno = " + JobRno;
                    db.Exec(Sql);
                }
            }

            // Finalized jobs
            Count = Str.Num(Request.Params["Count"]);
            for (int i = 1; i <= Count; i++)
            {
                int JobRno = Str.Num(Request.Params["chkProc" + i]);
                if (JobRno > 0)
                {
                    //string Sql = "Select CCNum1, CCNum2, CCNum3 From mcJobs Where JobRno = " + JobRno;
                    //DataRow dr = db.DataRow(Sql);
                    //string CCNum1 = DecryptCCNum(dr, "1");
                    //string CCNum2 = DecryptCCNum(dr, "2");
                    //string CCNum3 = DecryptCCNum(dr, "3");
                    //if (CCNum1.Length > 0)
                    //{
                    //	CCNum1 = "x" + Str.Right(CCNum1, 4);
                    //}
                    //if (CCNum2.Length > 0)
                    //{
                    //	CCNum2 = "x" + Str.Right(CCNum2, 4);
                    //}
                    //if (CCNum3.Length > 0)
                    //{
                    //	CCNum3 = "x" + Str.Right(CCNum3, 4);
                    //}

                    string Sql = "Update mcJobs Set " +
                                 "ProcessedDtTm = " + DB.PutDtTm(Tm) + ", " +
                                 "ProcessedUser = "******", " +
                                 //"CCSecCode1 = Null, CCSecCode2 = Null, CCSecCode3 = Null, " +
                                 //"CCNum1 = " + DB.PutStr(CCNum1) + ", " +
                                 //"CCNum2 = " + DB.PutStr(CCNum2) + ", " +
                                 //"CCNum3 = " + DB.PutStr(CCNum3) + ", " +
                                 "UpdatedDtTm = " + DB.PutDtTm(Tm) + ", " +
                                 "UpdatedUser = "******" " +
                                 "Where JobRno = " + JobRno;
                    db.Exec(Sql);
                }
            }
        }
    }