Exemplo n.º 1
0
        protected void gvMasterItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            int userCase = getUserCase();

            if (userCase == 0)
            {
                Response.Redirect("/Master-Items.aspx?miid=" + gvMasterItem.SelectedDataKey.Value.ToString());
            }
            else
            {
                AdminController aCont  = new AdminController();
                MasterItemInfo  master = aCont.Get_MasterItemById(Convert.ToInt32(gvMasterItem.SelectedDataKey.Value.ToString()));
                Response.Redirect("/Reports/miid/" + master.PMTMediaId);
            }
        }
Exemplo n.º 2
0
        public string AddMasterItem(string token, int PortalId, int ClientType, int ClientId, string Title, string Filename, string Length, string Format)
        {
            //client type: -1:don't know, 0:Advertiser, 1:Agency
            //Format should be "HD" or "SD"
            AdminController aCont    = new AdminController();
            string          MasterId = "";
            string          Secret   = "fEE3txVQkUSXiAC16vPeqdTTUwOYh99w";

            if (token == Secret)
            {
                try
                {
                    MasterItemInfo master = new MasterItemInfo();
                    master.PortalId = PortalId;
                    if (ClientType == 0 && ClientId > -1)
                    {
                        master.AdvertiserId = ClientId;
                    }
                    master.Title      = Title;
                    master.Filename   = Filename;
                    master.Length     = Length;
                    master.PMTMediaId = aCont.GetNextMediaId(PortalId);
                    if (Format == "HD")
                    {
                        master.PMTMediaId += "H";
                    }
                    master.Id = aCont.Add_MasterItem(master);
                    if (ClientType == 1 && ClientId > -1)
                    {
                        aCont.Add_MasterItemAgency(master.Id, ClientId);
                    }
                    MasterId = master.PMTMediaId;
                }
                catch (Exception ex)
                {
                    DotNetNuke.Services.Log.EventLog.EventLogController eCont = new DotNetNuke.Services.Log.EventLog.EventLogController();
                    eCont.AddLog("Add MasterItem Failed", "Error: " + ex.Message, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.HOST_ALERT);
                    Exceptions.LogException(ex);
                    MasterId = ex.Message;
                }
            }
            else
            {
                MasterId = "Failed.";
            }
            return(MasterId);
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["Master"] != null)
                {
                    try
                    {
                        int             MasterId = Convert.ToInt32(Request.QueryString["Master"]);
                        AdminController aCont    = new AdminController();
                        MasterItemInfo  master   = aCont.Get_MasterItemById(MasterId);
                        if (master.Id == -1)
                        {
                            pnlAuth.Visible    = false;
                            pnlNotAuth.Visible = true;
                            lblError.Text      = "Master not found.";
                        }
                        else
                        {
                            //check if user is authorized to view

                            //if authorized
                            loadForm(master);
                        }
                    }
                    catch
                    {
                        pnlAuth.Visible    = false;
                        pnlNotAuth.Visible = true;
                        lblError.Text      = "Master Id not in the correct format.";
                    }
                }
                else
                {
                    pnlAuth.Visible    = false;
                    pnlNotAuth.Visible = true;
                    lblError.Text      = "Invalid page request.";
                }
            }
        }
Exemplo n.º 4
0
 public abstract void Delete_MasterItem(MasterItemInfo MasterItem);
Exemplo n.º 5
0
 public abstract void Update_MasterItem(MasterItemInfo MasterItem);
Exemplo n.º 6
0
 public abstract int Add_MasterItemForImport(MasterItemInfo MasterItem);
Exemplo n.º 7
0
 public abstract int Add_MasterItem(MasterItemInfo MasterItem);
Exemplo n.º 8
0
        public string buildRequest(string ticket)
        {
            string req = "";

            string[] custCodes = new string[6] {
                "CUSTOMIZATION 30 MIN", "HD CUSTOMIZATION 30 MIN", "SPOT CUSTOMIZATION", "HD CUSTOMIZATION SPOT", "CUSTOMIZATION 5 MIN", "HD CUSTOMIZATION 5 MIN"
            };
            int custIndex = 2;

            int                i         = 1;
            string             xmlString = "";
            List <InvoiceInfo> invs      = aCont.Get_InvoicesByToSend();

            if (invs.Count > 0)
            {
                xmlString += "<?xml version=\"1.0\" encoding=\"utf-8\"?><?qbxml version=\"6.0\"?><QBXML><QBXMLMsgsRq onError=\"stopOnError\">";
                //build array of xml
                foreach (InvoiceInfo inv in invs)
                {
                    xmlString += "<InvoiceAddRq requestID=\"" + inv.Id.ToString() + "\"><InvoiceAdd>";//
                    List <int> woIds = aCont.Get_WOInsByInvoiceId(inv.Id);
                    if (woIds.Count > 0 && woIds[0] > 0)
                    {
                        WorkOrderInfo  wo1    = aCont.Get_WorkOrderById(woIds[0]);
                        AdvertiserInfo billto = aCont.Get_AdvertiserById(wo1.BillToId);
                        if (billto.Id == -1)
                        {
                            billto = aCont.Get_AdvertiserById(wo1.AdvertiserId);
                        }
                        i++;
                        xmlString += "<CustomerRef><FullName>" + billto.AdvertiserName.Trim().Replace("&", "&#038;") + "</FullName></CustomerRef>";
                        xmlString += "<BillAddress><Addr1>" + billto.AdvertiserName.Trim().Replace("&", "&#038;") + "</Addr1><Addr2>" + billto.Address1.Trim().Replace("&", "&#038;");
                        if (billto.Address2.Trim() != "")
                        {
                            xmlString += " - " + billto.Address2.Trim().Replace("&", "&#038;");
                        }
                        xmlString += "</Addr2><City>" + billto.City.Trim().Replace("&", "&#038;") + "</City><State>" + billto.State.Trim().Replace("&", "&#038;") + "</State><PostalCode>" + billto.Zip.Trim().Replace("&", "&#038;") + "</PostalCode><Country>" + billto.Country.Trim().Replace("&", "&#038;") + "</Country></BillAddress>";
                        string po = wo1.PONumber;
                        if (po == "")
                        {
                            try
                            {
                                po = wo1.Groups[0].LibraryItems[0].PMTMediaId.Replace("&", "&#038;");
                            }
                            catch { }
                        }
                        xmlString += "<PONumber>" + po.Replace("&", "&#038;") + "</PONumber>";
                        if (woIds.Count == 1)
                        {
                            xmlString += "<FOB>WO: " + woIds[0].ToString() + "</FOB>";
                        }
                        else if (woIds.Count > 1)
                        {
                            xmlString += "<FOB>SEE BELOW</FOB>";
                        }
                        xmlString += "<Memo>" + inv.Id.ToString() + "</Memo>";
                        AgencyInfo ag = aCont.Get_AgencyById(wo1.AgencyId);
                        xmlString += "<Other>" + ag.AgencyName.Trim().Replace("&", "&#038;") + "</Other>";
                        foreach (int woId in woIds)
                        {
                            WorkOrderInfo   wo       = aCont.Get_WorkOrderById(woId);
                            List <TaskInfo> tasks    = aCont.Get_TasksByWOId(wo.Id);
                            int             groupId  = -1;
                            bool            groupNew = true;
                            for (int j = 0; j < tasks.Count; j++)
                            {
                                TaskInfo task = tasks[j];
                                if (groupId == -1)
                                {
                                    groupId = task.WOGroupId;
                                }
                                if (task.WOGroupId != groupId)
                                {
                                    groupNew = true;
                                    groupId  = task.WOGroupId;
                                }
                                if (task.DeliveryStatus.ToLower() != "cancelled" && !task.isDeleted)
                                {
                                    if (task.TaskType != GroupTypeEnum.Delivery)
                                    {
                                        WOGroupInfo       group     = aCont.Get_WorkOrderGroupById(task.WOGroupId);
                                        List <QBCodeInfo> servCodes = aCont.FindQBCodesByTask(task.Id, 0, true);
                                        LibraryItemInfo   lib       = aCont.Get_LibraryItemById(task.LibraryId);
                                        MasterItemInfo    master    = new MasterItemInfo();
                                        if (task.TaskType == GroupTypeEnum.Non_Deliverable)
                                        {
                                            master = aCont.Get_MasterItemById(task.MasterId);
                                        }
                                        //foreach (ServiceInfo serv in group.Services)
                                        if (groupNew)
                                        {
                                            foreach (QBCodeInfo code in servCodes)
                                            {
                                                if (task.TaskType != GroupTypeEnum.Non_Deliverable)
                                                {
                                                    xmlString += "<InvoiceLineAdd>";
                                                    xmlString += "<ItemRef><FullName>" + code.QBCode.Replace("&", "&#038;") + "</FullName></ItemRef>";
                                                    xmlString += "<Desc>" + lib.Title.Replace("&", "&#038;"); //code.QBCode.Replace("&", "&#038;");
                                                    if (woIds.Count > 1 && j == 0)
                                                    {
                                                        xmlString += " WO " + wo.Id.ToString();
                                                    }
                                                    xmlString += "</Desc>";
                                                    if (task.Quantity == 0)
                                                    {
                                                        task.Quantity = 1;
                                                    }
                                                    xmlString += "<Quantity>" + group.LibraryItems.Count.ToString() + "</Quantity>";
                                                    xmlString += "<Other1></Other1>";
                                                    xmlString += "<Other2></Other2></InvoiceLineAdd>";
                                                }
                                                else
                                                {
                                                    xmlString += "<InvoiceLineAdd>";
                                                    xmlString += "<ItemRef><FullName>" + code.QBCode.Replace("&", "&#038;") + "</FullName></ItemRef>";
                                                    xmlString += "<Desc>" + master.Title.Replace("&", "&#038;");
                                                    if (woIds.Count > 1 && j == 0)
                                                    {
                                                        xmlString += " WO " + wo.Id.ToString();
                                                    }
                                                    xmlString += "</Desc>";
                                                    if (task.Quantity == 0)
                                                    {
                                                        task.Quantity = 1;
                                                    }
                                                    xmlString += "<Quantity>" + task.Quantity + "</Quantity>";
                                                    xmlString += "<Other1>" + lib.ProductDescription.Trim().Replace("&", "&#038;") + "</Other1>";
                                                    xmlString += "<Other2>" + lib.ISCICode.Trim().Replace("&", "&#038;") + "</Other2></InvoiceLineAdd>";
                                                }
                                            }
                                            groupNew = false;
                                        }
                                    }
                                    if (task.TaskType == GroupTypeEnum.Bundle || task.TaskType == GroupTypeEnum.Delivery || task.TaskType == GroupTypeEnum.Customized)
                                    {
                                        LibraryItemInfo lib  = aCont.Get_LibraryItemById(task.LibraryId);
                                        bool            isHd = lib.MediaType.IndexOf("HD") != -1;
                                        string[]        pcs  = lib.MediaLength.Split(':');
                                        int             secs = 0;
                                        if (pcs.Length == 2)
                                        {
                                            try
                                            {
                                                secs = 60 * Convert.ToInt32(pcs[0]) + Convert.ToInt32(pcs[1]);
                                            }
                                            catch { }
                                        }
                                        if (secs <= 120 && !isHd)
                                        {
                                            custIndex = 2;
                                        }
                                        else if (secs <= 120 && isHd)
                                        {
                                            custIndex = 3;
                                        }
                                        else if (secs >= 1500 && secs <= 1800 && !isHd)
                                        {
                                            custIndex = 0;
                                        }
                                        else if (secs >= 1500 && secs <= 1800 && isHd)
                                        {
                                            custIndex = 1;
                                        }
                                        else if (secs >= 180 && secs <= 300 && !isHd)
                                        {
                                            custIndex = 4;
                                        }
                                        else if (secs >= 180 && secs <= 300 && !isHd)
                                        {
                                            custIndex = 5;
                                        }
                                        xmlString += "<InvoiceLineAdd>";
                                        if (task.TaskType != GroupTypeEnum.Customized)
                                        {
                                            xmlString += "<ItemRef><FullName>" + task.QBCode.Trim().Replace("&", "&#038;") + "</FullName></ItemRef>";
                                        }
                                        else
                                        {
                                            xmlString += "<ItemRef><FullName>" + custCodes[custIndex] + "</FullName></ItemRef>";
                                        }
                                        xmlString += "<Desc>" + lib.Title.Trim().Replace("&", "&#038;");
                                        if (woIds.Count > 1 && j == 0)
                                        {
                                            xmlString += " WO " + wo.Id.ToString();
                                        }
                                        xmlString += "</Desc>";
                                        if (task.Quantity == 0)
                                        {
                                            task.Quantity = 1;
                                        }
                                        xmlString += "<Quantity>" + task.Quantity + "</Quantity>";
                                        xmlString += "<Other1>" + lib.ProductDescription.Trim().Replace("&", "&#038;") + "</Other1>";
                                        if (lib.TapeCode.Trim() == "")
                                        {
                                            xmlString += "<Other2>" + lib.ISCICode.Trim().Replace("&", "&#038;") + "</Other2></InvoiceLineAdd>";
                                        }
                                        else
                                        {
                                            xmlString += "<Other2>" + lib.TapeCode.Trim().Replace("&", "&#038;") + "</Other2></InvoiceLineAdd>";
                                        }
                                        WOGroupStationInfo station = aCont.Get_WorkOrderGroupStationById(task.StationId);
                                        if (station.DeliveryMethod.ToLower().IndexOf("tf_") != -1)
                                        {
                                            //check to see if we need to add shipping
                                            if (station.ShippingMethodId == -1)
                                            {
                                                int            weight = 1;
                                                TapeFormatInfo tape   = aCont.Get_TapeFormatById(Convert.ToInt32(station.DeliveryMethod.Replace("tf_", "")));
                                                if (station.Quantity * tape.Weight > 1.0)
                                                {
                                                    weight = 2;
                                                }
                                                string shippingPrice = "";
                                                if (weight == 1)
                                                {
                                                    if (station.PriorityId == 1)
                                                    {
                                                        shippingPrice = ConfigurationManager.AppSettings["FedEx1LbPriority"].ToString();
                                                    }
                                                    else if (station.PriorityId == 2)
                                                    {
                                                        shippingPrice = ConfigurationManager.AppSettings["FedEx1LbStandard"].ToString();
                                                    }
                                                    else if (station.PriorityId == 3)
                                                    {
                                                        shippingPrice = ConfigurationManager.AppSettings["FedEx1Lb2Day"].ToString();
                                                    }
                                                }
                                                else
                                                {
                                                    if (station.PriorityId == 1)
                                                    {
                                                        shippingPrice = ConfigurationManager.AppSettings["FedEx2LbPriority"].ToString();
                                                    }
                                                    else if (station.PriorityId == 2)
                                                    {
                                                        shippingPrice = ConfigurationManager.AppSettings["FedEx2LbStandard"].ToString();
                                                    }
                                                    else if (station.PriorityId == 3)
                                                    {
                                                        shippingPrice = ConfigurationManager.AppSettings["FedEx2Lb2Day"].ToString();
                                                    }
                                                }
                                                xmlString += "<InvoiceLineAdd><ItemRef><FullName>SHIPPING</FullName></ItemRef><Desc>P" + station.PriorityId.ToString() + " " + weight.ToString() + "LB SHIPPING CHARGE</Desc><Quantity>1</Quantity><Rate>" + shippingPrice + "</Rate></InvoiceLineAdd>";
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    xmlString += "</InvoiceAdd></InvoiceAddRq>";
                    //xmlString += "";
                }
                xmlString += "</QBXMLMsgsRq></QBXML>";
                req        = xmlString;
                //}
            }
            return(req);
        }
Exemplo n.º 9
0
 private void loadForm(MasterItemInfo master)
 {
     if (master.CheckListForm == "")
     {
         //never saved before
         txtDate.Text      = "Date: " + DateTime.Now.ToShortDateString();
         txtPMTnumber.Text = "PMT #: " + master.PMTMediaId;
         txtVaultId.Text   = "Vault Id: " + master.VaultId;
     }
     else
     {
         //load it up
         XmlDocument doc = new XmlDocument();
         doc.LoadXml(master.CheckListForm);
         txtDate.Text                     = getXmlNodeText(ref doc, "date", "Date: ");
         txtVaultId.Text                  = getXmlNodeText(ref doc, "vaultid", "Vault Id: ");
         txtQc.Text                       = getXmlNodeText(ref doc, "qcby", "QC By: ");
         chkReceived.Checked              = Convert.ToBoolean(getXmlNodeText(ref doc, "received", ""));
         txtPMTnumber.Text                = getXmlNodeText(ref doc, "pmtmediaid", "PMT #: ");
         ddlResolution.SelectedValue      = getXmlNodeText(ref doc, "resolution", "");
         ddlAudtio.SelectedValue          = getXmlNodeText(ref doc, "audio", "");
         ddlLanguage.SelectedValue        = getXmlNodeText(ref doc, "language", "");
         ddlTimecode.SelectedValue        = getXmlNodeText(ref doc, "timecode", "");
         chkWatermark.Checked             = Convert.ToBoolean(getXmlNodeText(ref doc, "watermark", ""));
         ddlType.SelectedValue            = getXmlNodeText(ref doc, "type", "");
         chkDownConvert.Checked           = Convert.ToBoolean(getXmlNodeText(ref doc, "downconvert", ""));
         chkCenterCutSafe.Checked         = Convert.ToBoolean(getXmlNodeText(ref doc, "centercutsafe", ""));
         chkLetterbox.Checked             = Convert.ToBoolean(getXmlNodeText(ref doc, "letterbox", ""));
         chkClosedCaptioned.Checked       = Convert.ToBoolean(getXmlNodeText(ref doc, "closedcaptioned", ""));
         txtTitle.Text                    = getXmlNodeText(ref doc, "title", "Title: ");
         txtVersion.Text                  = getXmlNodeText(ref doc, "version", "Version: ");
         txtTRT.Text                      = getXmlNodeText(ref doc, "trt", "TRT: ");
         txtOffer.Text                    = getXmlNodeText(ref doc, "offer", "Offer: ");
         txtHost.Text                     = getXmlNodeText(ref doc, "host", "Host: ");
         ddlFormat.SelectedValue          = getXmlNodeText(ref doc, "format", "");
         txtAKA.Text                      = getXmlNodeText(ref doc, "aka", "A.K.A.: ");
         txtOfferDate.Text                = getXmlNodeText(ref doc, "labeldate", "Date: ");
         txtDisclaimerFor.Text            = getXmlNodeText(ref doc, "for", "For: ");
         txtDisclaimerBy.Text             = getXmlNodeText(ref doc, "by", "By: ");
         ddlDisclaimerOpen.SelectedValue  = getXmlNodeText(ref doc, "open", "");
         ddlDisclaimerClose.SelectedValue = getXmlNodeText(ref doc, "close", "");
         chkExercise.Checked              = Convert.ToBoolean(getXmlNodeText(ref doc, "exercise", ""));
         txtExerciseTimes.Text            = getXmlNodeText(ref doc, "exercisetimes", "How Many Times: ");
         chkUIGEA.Checked                 = Convert.ToBoolean(getXmlNodeText(ref doc, "uigea", ""));
         txtUIGEATimes.Text               = getXmlNodeText(ref doc, "uigeatimes", "How Many Times: ");
         chkStateTimes.Checked            = Convert.ToBoolean(getXmlNodeText(ref doc, "staterestrictions", ""));
         txtStateTimes.Text               = getXmlNodeText(ref doc, "statetimes", "How Many Times: ");
         chkResultsVary.Checked           = Convert.ToBoolean(getXmlNodeText(ref doc, "actual", ""));
         txtResultsVaryTimes.Text         = getXmlNodeText(ref doc, "actualtimes", "How Many Times: ");
         chkApple.Checked                 = Convert.ToBoolean(getXmlNodeText(ref doc, "apple", ""));
         txtAppleTimes.Text               = getXmlNodeText(ref doc, "appletimes", "How Many Times: ");
         //price", ddlPrice.SelectedValue
         txtPrice2.Text = getXmlNodeText(ref doc, "price2", "");
         txtPrice3.Text = getXmlNodeText(ref doc, "price3", "$ ");
         txtSandH.Text  = getXmlNodeText(ref doc, "sandh", "SHIPPING & HANDLING $: ");
         foreach (ListItem li in chkCCList.Items)
         {
             li.Selected = Convert.ToBoolean(getXmlNodeText(ref doc, li.Value, ""));
         }
         chkMoneyBack.Checked = Convert.ToBoolean(getXmlNodeText(ref doc, "moneyback", ""));
         chkLessSandH.Checked = Convert.ToBoolean(getXmlNodeText(ref doc, "lesssandh", ""));
         chkUSFunds.Checked   = Convert.ToBoolean(getXmlNodeText(ref doc, "usfunds", ""));
         chkResponseAddressLocation.Checked = Convert.ToBoolean(getXmlNodeText(ref doc, "responseaddresslocation", ""));
         txtResponseStreet.Text             = getXmlNodeText(ref doc, "responsestreet", "");
         txtResponseCity.Text   = getXmlNodeText(ref doc, "responsecity", "");
         txtResponseState.Text  = getXmlNodeText(ref doc, "responsestate", "");
         txtResponseZip.Text    = getXmlNodeText(ref doc, "responsezip", "");
         chkWebsite.Checked     = Convert.ToBoolean(getXmlNodeText(ref doc, "website", ""));
         txtWebsiteAddress.Text = getXmlNodeText(ref doc, "url", "Website Address: ");
         chkInCTA.Checked       = Convert.ToBoolean(getXmlNodeText(ref doc, "incta", ""));
         chkWithPhone.Checked   = Convert.ToBoolean(getXmlNodeText(ref doc, "withphone", ""));
         chkClub.Checked        = Convert.ToBoolean(getXmlNodeText(ref doc, "club", ""));
         chkClock.Checked       = Convert.ToBoolean(getXmlNodeText(ref doc, "clock", ""));
         chkEDLReq.Checked      = Convert.ToBoolean(getXmlNodeText(ref doc, "edlreq", ""));
         chkGenericVO.Checked   = Convert.ToBoolean(getXmlNodeText(ref doc, "genericvo", ""));
         chkScript.Checked      = Convert.ToBoolean(getXmlNodeText(ref doc, "script", ""));
         txtDelivery.Text       = getXmlNodeText(ref doc, "delivery", "Delivery: ");
         chk18Over.Checked      = Convert.ToBoolean(getXmlNodeText(ref doc, "eightteen", ""));
         txtAttachments.Text    = getXmlNodeText(ref doc, "attachments", "Attachments: ");
         chkSlate.Checked       = Convert.ToBoolean(getXmlNodeText(ref doc, "slate", ""));
         chkJpeg.Checked        = Convert.ToBoolean(getXmlNodeText(ref doc, "jpeg", ""));
         chkScripts.Checked     = Convert.ToBoolean(getXmlNodeText(ref doc, "scripts", ""));
         ddlEDL.SelectedValue   = getXmlNodeText(ref doc, "edl", "");
         txtComments.Text       = getXmlNodeText(ref doc, "comments", "Comments/Notes: ");
     }
 }
Exemplo n.º 10
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            XmlDocument doc = new XmlDocument();
            //XmlDeclaration xmlDeclaration = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
            //XmlElement root = doc.DocumentElement;
            //doc.InsertBefore(xmlDeclaration, root);
            XmlNode rootNode = doc.CreateElement(string.Empty, "root", string.Empty);

            doc.AppendChild(rootNode);

            makeXmlNode(ref doc, "date", txtDate.Text);
            makeXmlNode(ref doc, "vaultid", txtVaultId.Text);
            makeXmlNode(ref doc, "qcby", txtQc.Text);
            makeXmlNode(ref doc, "received", chkReceived.Checked.ToString());
            makeXmlNode(ref doc, "pmtmediaid", txtPMTnumber.Text);
            makeXmlNode(ref doc, "resolution", ddlResolution.SelectedValue);
            makeXmlNode(ref doc, "audio", ddlAudtio.SelectedValue);
            makeXmlNode(ref doc, "language", ddlLanguage.SelectedValue);
            makeXmlNode(ref doc, "timecode", ddlTimecode.SelectedValue);
            makeXmlNode(ref doc, "watermark", chkWatermark.Checked.ToString());
            makeXmlNode(ref doc, "type", ddlType.SelectedValue);
            makeXmlNode(ref doc, "downconvert", chkDownConvert.Checked.ToString());
            makeXmlNode(ref doc, "centercutsafe", chkCenterCutSafe.Checked.ToString());
            makeXmlNode(ref doc, "letterbox", chkLetterbox.Checked.ToString());
            makeXmlNode(ref doc, "closedcaptioned", chkClosedCaptioned.Checked.ToString());
            makeXmlNode(ref doc, "title", txtTitle.Text);
            makeXmlNode(ref doc, "version", txtVersion.Text);
            makeXmlNode(ref doc, "trt", txtTRT.Text);
            makeXmlNode(ref doc, "offer", txtOffer.Text);
            makeXmlNode(ref doc, "host", txtHost.Text);
            makeXmlNode(ref doc, "format", ddlFormat.SelectedValue);
            makeXmlNode(ref doc, "aka", txtAKA.Text);
            makeXmlNode(ref doc, "labeldate", txtOfferDate.Text);
            makeXmlNode(ref doc, "for", txtDisclaimerFor.Text);
            makeXmlNode(ref doc, "by", txtDisclaimerBy.Text);
            makeXmlNode(ref doc, "open", ddlDisclaimerOpen.SelectedValue);
            makeXmlNode(ref doc, "close", ddlDisclaimerClose.SelectedValue);
            makeXmlNode(ref doc, "exercise", chkExercise.Checked.ToString());
            makeXmlNode(ref doc, "exercisetimes", txtExerciseTimes.Text);
            makeXmlNode(ref doc, "uigea", chkUIGEA.Checked.ToString());
            makeXmlNode(ref doc, "uigeatimes", txtUIGEATimes.Text);
            makeXmlNode(ref doc, "staterestrictions", chkStateTimes.Checked.ToString());
            makeXmlNode(ref doc, "statetimes", txtStateTimes.Text);
            makeXmlNode(ref doc, "actual", chkResultsVary.Checked.ToString());
            makeXmlNode(ref doc, "actualtimes", txtResultsVaryTimes.Text);
            makeXmlNode(ref doc, "apple", chkApple.Checked.ToString());
            makeXmlNode(ref doc, "appletimes", txtAppleTimes.Text);
            makeXmlNode(ref doc, "price2", txtPrice2.Text);
            makeXmlNode(ref doc, "price3", txtPrice3.Text);
            makeXmlNode(ref doc, "sandh", txtSandH.Text);
            foreach (ListItem li in chkCCList.Items)
            {
                makeXmlNode(ref doc, li.Value, li.Selected.ToString());
            }
            makeXmlNode(ref doc, "moneyback", chkMoneyBack.Checked.ToString());
            makeXmlNode(ref doc, "lesssandh", chkLessSandH.Checked.ToString());
            makeXmlNode(ref doc, "usfunds", chkUSFunds.Checked.ToString());
            makeXmlNode(ref doc, "responseaddresslocation", chkResponseAddressLocation.Checked.ToString());
            makeXmlNode(ref doc, "responsestreet", txtResponseStreet.Text);
            makeXmlNode(ref doc, "responsecity", txtResponseCity.Text);
            makeXmlNode(ref doc, "responsestate", txtResponseState.Text);
            makeXmlNode(ref doc, "responsezip", txtResponseZip.Text);
            makeXmlNode(ref doc, "website", chkWebsite.Checked.ToString());
            makeXmlNode(ref doc, "url", txtWebsiteAddress.Text);
            makeXmlNode(ref doc, "incta", chkInCTA.Checked.ToString());
            makeXmlNode(ref doc, "withphone", chkWithPhone.Checked.ToString());
            makeXmlNode(ref doc, "club", chkClub.Checked.ToString());
            makeXmlNode(ref doc, "clock", chkClock.Checked.ToString());
            makeXmlNode(ref doc, "edlreq", chkEDLReq.Checked.ToString());
            makeXmlNode(ref doc, "genericvo", chkGenericVO.Checked.ToString());
            makeXmlNode(ref doc, "script", chkScript.Checked.ToString());
            makeXmlNode(ref doc, "delivery", txtDelivery.Text);
            makeXmlNode(ref doc, "eightteen", chk18Over.Checked.ToString());
            makeXmlNode(ref doc, "attachments", txtAttachments.Text);
            makeXmlNode(ref doc, "slate", chkSlate.Checked.ToString());
            makeXmlNode(ref doc, "jpeg", chkJpeg.Checked.ToString());
            makeXmlNode(ref doc, "scripts", chkScripts.Checked.ToString());
            makeXmlNode(ref doc, "edl", ddlEDL.SelectedValue);
            makeXmlNode(ref doc, "comments", txtComments.Text);
            if (Request.QueryString["Master"] != null)
            {
                int             MasterId = Convert.ToInt32(Request.QueryString["Master"]);
                AdminController aCont    = new AdminController();
                MasterItemInfo  master   = aCont.Get_MasterItemById(Convert.ToInt32(Request.QueryString["Master"]));
                master.CheckListForm    = doc.OuterXml.ToString();
                master.LastModifiedById = UserId;
                master.LastModifiedDate = DateTime.Now;
                aCont.Update_MasterItem(master);
                lblMessage.Text            = "Checklist Saved.";
                Application["MasterItems"] = null;
            }
        }