Esempio n. 1
0
        /// <summary>
        /// 得到一个实体对象
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public static Model.InvoiceList GetModel(string OrderNumber)
        {
            string strSql = "select * from InvoiceList where OrderNumber = '" + OrderNumber + "'";

            Model.InvoiceList model = new Model.InvoiceList();
            DataSet           ds    = DBHelperSQL.GetDataSet(strSql, connectionString);

            model.OrderNumber = OrderNumber;
            if (ds.Tables[0].Rows.Count > 0)
            {
                model.ID               = Convert.ToInt32(ds.Tables[0].Rows[0]["ID"]);
                model.OrderDetail      = Convert.ToString(ds.Tables[0].Rows[0]["OrderDetail"]);
                model.Price            = Convert.ToString(ds.Tables[0].Rows[0]["Price"]);
                model.SubmitTime       = Convert.ToDateTime(ds.Tables[0].Rows[0]["SubmitTime"]);
                model.DealTime         = Convert.ToDateTime(ds.Tables[0].Rows[0]["DealTime"]);
                model.PayTime          = Convert.ToDateTime(ds.Tables[0].Rows[0]["PayTime"]);
                model.Status           = Convert.ToInt32(ds.Tables[0].Rows[0]["Status"]);
                model.InvoiceInfoIndex = Convert.ToString(ds.Tables[0].Rows[0]["InvoiceInfoIndex"]);
                model.InvoiceType      = Convert.ToInt32(ds.Tables[0].Rows[0]["InvoiceType"]);
                model.IssueType        = Convert.ToInt32(ds.Tables[0].Rows[0]["IssueType"]);
                model.InvoiceFile      = Convert.ToString(ds.Tables[0].Rows[0]["InvoiceFile"]);
                model.UserName         = Convert.ToString(ds.Tables[0].Rows[0]["UserName"]);
                return(model);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["id"] != "" && Request["id"] != null)
     {
         Session["id"] = Request["id"].ToString();
         Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(Convert.ToInt32(Session["id"]));
         UserNmae.Value = invoiceList.UserName;
     }
 }
Esempio n. 3
0
        protected void Unnamed1_Click(object sender, EventArgs e)
        {
            //try
            //{
            //    string fullPathUrl = Server.MapPath(aaPh);//获取下载文件的路劲
            //    System.IO.FileInfo file = new System.IO.FileInfo(fullPathUrl);
            //    if (file.Exists)//判断文件是否存在
            //    {
            //        Response.Clear();
            //        Response.ClearHeaders();
            //        Response.Buffer = false;
            //        Response.AddHeader("content-disposition", "attachment;filename=" + file.Name);
            //        Response.AddHeader("cintent_length", "attachment;filename=" + HttpUtility.UrlDecode(file.Name));
            //        Response.AddHeader("cintent_length", file.Length.ToString());
            //        Response.ContentType = "application/octet-stream";
            //        Response.WriteFile(file.FullName);//通过response对象,执行下载操作
            //        Response.Flush();
            //        Response.End();


            //    }
            //    else
            //    {
            //        ScriptManager.RegisterStartupScript(this, this.GetType(), "dd", "alert('文件不存在')", true);
            //    }
            //}
            //catch
            //{
            //    ScriptManager.RegisterStartupScript(this, this.GetType(), "dd", "alert('下载成功')", true);
            //}


            Model.ContractApplication contractApplication = new Model.ContractApplication();
            Model.InvoiceList         invoiceList         = DAL.InvoiceList.GetModel(Convert.ToInt32(Session["id"]));
            invoiceList.ContractStatus = 4;
            DAL.InvoiceList.Update(invoiceList);
            string num = cs.VerifyCodeHelper.Number(4, true);

            contractApplication.ID = invoiceList.UserName + DateTime.Now.Year + "0" + DateTime.Now.Month + num;

            contractApplication.UserName = invoiceList.UserName;
            string id = contractApplication.ID;

            contractApplication.Address  = this.address.Value;
            contractApplication.Contacts = this.contacts.Value;
            contractApplication.Phone    = this.phone.Value;
            contractApplication.Price    = invoiceList.Price;
            contractApplication.Type     = "0";
            string aaPh = "/upload/Invoice/合同.docx";

            // System.IO.FileInfo file = new System.IO.FileInfo(aaPh);
            //contractApplication.ContractFile = file;
            contractApplication.ContractFile = aaPh;
            DAL.ContractApplication.Add(contractApplication);
            Response.Redirect("EndContract.aspx?ID=" + id + "");
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserName"] == null || Session["UserType"] == null || Convert.ToInt32(Session["UserType"]) < 0 || Convert.ToInt32(Session["UserType"]) > 5)
            {
                Response.Write("<script>alert(\"请登录\");location.href = location.origin+\"/forms/publicforms/Login/Login.aspx\";</script>");
                Response.End();
            }
            if (Request["action"] != null && Request["action"] == "GetData")
            {
                if (!Get_invoice())
                {
                    Response.Write("0");
                }
            }

            if (Request["action"] != null && Request["action"] == "DeleteCors")
            {
                DeleteCors();
            }
            if (Request["invoiceListId"] != null)
            {
                string            invoiceListID = Request["invoiceListID"].ToString();
                Model.InvoiceList invoiceList   = DAL.InvoiceList.GetModel(Convert.ToInt32(Request["invoiceListID"]));
                invoiceList.ContractStatus = 2;
                DAL.InvoiceList.Update(invoiceList);
                Response.Write("success");
                Response.End();
            }
            if (Request["action"] != null && Request["action"] == "downloadfile")
            {
                string ID = Request["id"].ToString();
                Model.ContractApplication contract = DAL.ContractApplication.GetModel(ID);
                if (contract.UserName != Session["UserName"].ToString())
                {
                    Response.End();
                }
                else
                {
                    //string fileName = invoiceList.InvoiceFile;//客户端保存的文件名
                    //string filePath = Server.MapPath("DownLoad/aaa.txt");//路径
                    string   filePath = this.Server.MapPath(contract.ContractFile);//文件路径,可用相对路径
                    FileInfo fileInfo = new FileInfo(filePath);
                    Response.Clear();
                    Response.ClearContent();
                    Response.ClearHeaders();
                    Response.AddHeader("Content-Disposition", "attachment;filename=" + Server.UrlEncode(fileInfo.Name.ToString()));
                    Response.AddHeader("Content-Length", fileInfo.Length.ToString());
                    Response.AddHeader("Content-Transfer-Encoding", "binary");
                    Response.ContentType     = "application/octet-stream";
                    Response.ContentEncoding = System.Text.Encoding.Default;
                    Response.WriteFile(fileInfo.FullName);
                    Response.Flush();
                    Response.End();
                }
            }
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["action"].ToString() == "transferContractListId" && Request["id"] != null)
                {
                    invoice.Style.Add("display", "none");
                    submitInvoiceFile.Style.Add("display", "none");

                    string ff = Request["id"].ToString();
                    invoiceListId = Convert.ToInt32(Request["id"].ToString());

                    string template = " <li><a id=\"contract_file_symbol\" href=\"@href\"download=\"@download\" style=\"font-size: x-large\">@content</a></li>";


                    Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(invoiceListId);
                    invoiceHead.Value = DAL.InvoiceInfo.GetModel(Convert.ToInt32(invoiceList.InvoiceInfoIndex)).Invoice;
                    taxNum.Value      = DAL.InvoiceInfo.GetModel(Convert.ToInt32(invoiceList.InvoiceInfoIndex)).TaxNum;
                    if (invoiceList.ContractStatus == 4 && invoiceList.ContractFile != "")
                    {
                        //invoiceFile.Src = invoiceList.ContractFile;
                        //invoiceFile.Height = 500;
                        //invoiceFile.Width = 1000;
                        string temp = template;
                        //temp = temp.Replace("@href",url+port+@"\ResourceDownload\"+rsFullName);
                        temp             = temp.Replace("@href", invoiceList.ContractFile);
                        temp             = temp.Replace("@download", invoiceList.ContractFile);
                        temp             = temp.Replace("@content", "合同文件");
                        linkContractFile = temp;
                    }
                    else
                    {
                        //linkContractFile = "";
                    }
                }

                else
                {
                }
            }

            if (Request["action"] != null && Request["action"] == "AddData")
            {
                AddData();
            }
            if (Request["action"] != null && Request["action"] == "OK")
            {
                Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(invoiceListId);
                invoiceList.ContractFile   = contract_path;
                invoiceList.ContractStatus = 4;
                DAL.InvoiceList.Update(invoiceList);
                Response.Write("1");
                Response.End();
            }
        }
Esempio n. 6
0
 private void submitInvoiceInfo()
 {
     // string a = Request["invoiceInfoId"];
     Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(invoiceListId);
     invoiceList.InvoiceInfoIndex = Request["invoiceInfoId"].ToString();
     invoiceList.Status           = 2;
     DAL.InvoiceList.Update(invoiceList);
     Response.Clear();
     Response.Write("OK");
     Response.End();
 }
Esempio n. 7
0
        /// <summary>
        /// 更新发票的申请处理状态
        /// </summary>
        /// <param name="invoiceListID"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        private bool verify(int invoiceListID, string status)
        {
            Model.InvoiceList invoicelist = DAL.InvoiceList.GetModel(invoiceListID);
            if (status == "OK")
            {
                invoicelist.Status = 3;
            }
            else
            {
                invoicelist.Status = -1;
            }

            DAL.InvoiceList.Update(invoicelist);
            return(true);
        }
Esempio n. 8
0
        /// <summary>
        /// 更新一条数据,根据ID
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool Update(Model.InvoiceList model)
        {
            string       strSql           = "update InvoiceList set UserName=@UserName, OrderNumber=@OrderNumber, OrderDetail=@OrderDetail, Price=@Price, SubmitTime=@SubmitTime, DealTime=@DealTime, PayTime=@PayTime, Status=@Status, InvoiceInfoIndex=@InvoiceInfoIndex, InvoiceType=@InvoiceType, IssueType=@IssueType, InvoiceFile=@InvoiceFile where ID = " + model.ID.ToString();
            SqlParameter OrderNumber      = new SqlParameter("OrderNumber", SqlDbType.NVarChar); OrderNumber.Value = model.OrderNumber;
            SqlParameter OrderDetail      = new SqlParameter("OrderDetail", SqlDbType.NVarChar); OrderDetail.Value = model.OrderDetail;
            SqlParameter Price            = new SqlParameter("Price", SqlDbType.NVarChar); Price.Value = model.Price;
            SqlParameter SubmitTime       = new SqlParameter("SubmitTime", SqlDbType.DateTime); SubmitTime.Value = model.SubmitTime;
            SqlParameter DealTime         = new SqlParameter("DealTime", SqlDbType.DateTime); DealTime.Value = model.DealTime;
            SqlParameter PayTime          = new SqlParameter("PayTime", SqlDbType.DateTime); PayTime.Value = model.PayTime;
            SqlParameter Status           = new SqlParameter("Status", SqlDbType.Int); Status.Value = model.Status;
            SqlParameter InvoiceInfoIndex = new SqlParameter("InvoiceInfoIndex", SqlDbType.NVarChar); InvoiceInfoIndex.Value = model.InvoiceInfoIndex;
            SqlParameter UserName         = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName;
            SqlParameter InvoiceType      = new SqlParameter("InvoiceType", SqlDbType.Int); InvoiceType.Value = model.InvoiceType;
            SqlParameter IssueType        = new SqlParameter("IssueType", SqlDbType.Int); IssueType.Value = model.IssueType;
            SqlParameter InvoiceFile      = new SqlParameter("InvoiceFile", SqlDbType.NVarChar); InvoiceFile.Value = model.InvoiceFile;

            return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, OrderNumber, OrderDetail, Price, SubmitTime, DealTime, PayTime, Status, InvoiceInfoIndex, InvoiceType, IssueType, InvoiceFile }, connectionString) == 1 ? true : false);
        }
Esempio n. 9
0
        /// <summary>
        /// 增加一个用户信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool Add(Model.InvoiceList model)
        {
            string       strSql           = "insert into InvoiceList( UserName, OrderNumber, OrderDetail, Price, SubmitTime, DealTime, PayTime, Status, InvoiceInfoIndex, InvoiceType, IssueType, InvoiceFile,ContractFile,ContractStatus,BelongArea) values( @UserName, @OrderNumber, @OrderDetail, @Price, @SubmitTime, @DealTime, @PayTime, @Status, @InvoiceInfoIndex, @InvoiceType, @IssueType, @InvoiceFile,@ContractFile,@ContractStatus,@BelongArea) ";
            SqlParameter OrderNumber      = new SqlParameter("OrderNumber", SqlDbType.NVarChar); OrderNumber.Value = model.OrderNumber;
            SqlParameter OrderDetail      = new SqlParameter("OrderDetail", SqlDbType.NVarChar); OrderDetail.Value = model.OrderDetail;
            SqlParameter Price            = new SqlParameter("Price", SqlDbType.NVarChar); Price.Value = model.Price;
            SqlParameter SubmitTime       = new SqlParameter("SubmitTime", SqlDbType.DateTime); SubmitTime.Value = model.SubmitTime;
            SqlParameter DealTime         = new SqlParameter("DealTime", SqlDbType.DateTime); DealTime.Value = model.DealTime;
            SqlParameter PayTime          = new SqlParameter("PayTime", SqlDbType.DateTime); PayTime.Value = model.PayTime;
            SqlParameter Status           = new SqlParameter("Status", SqlDbType.Int); Status.Value = model.Status;
            SqlParameter InvoiceInfoIndex = new SqlParameter("InvoiceInfoIndex", SqlDbType.NVarChar); InvoiceInfoIndex.Value = model.InvoiceInfoIndex;
            SqlParameter UserName         = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName;
            SqlParameter InvoiceType      = new SqlParameter("InvoiceType", SqlDbType.Int); InvoiceType.Value = model.InvoiceType;
            SqlParameter IssueType        = new SqlParameter("IssueType", SqlDbType.Int); IssueType.Value = model.IssueType;
            SqlParameter InvoiceFile      = new SqlParameter("InvoiceFile", SqlDbType.NVarChar); InvoiceFile.Value = model.InvoiceFile;
            SqlParameter ContractFile     = new SqlParameter("ContractFile", SqlDbType.NVarChar); ContractFile.Value = model.ContractFile;
            SqlParameter ContractStatus   = new SqlParameter("ContractStatus", SqlDbType.Int); ContractStatus.Value = model.ContractStatus;
            SqlParameter BelongArea       = new SqlParameter("BelongArea", SqlDbType.NVarChar); BelongArea.Value = model.BelongArea;

            return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, OrderNumber, OrderDetail, Price, SubmitTime, DealTime, PayTime, Status, InvoiceInfoIndex, InvoiceType, IssueType, InvoiceFile, ContractFile, ContractStatus, BelongArea }, connectionString) == 1 ? true : false);
        }
Esempio n. 10
0
        private bool AddData()
        {
            try
            {
                Model.OrderList orderlist = DAL.OrderList.GetModel(Convert.ToInt32(Request["verify"]));
                if (Request["status"] == "OK")
                {
                    orderlist.OrderStatus = 2;

                    if (orderlist.OrdeType == 0)//账号申请
                    {
                        //订单审核通过后添加发票信息
                        Model.InvoiceList invoicelist = new Model.InvoiceList();
                        invoicelist.OrderDetail    = orderlist.ID.ToString();
                        invoicelist.OrderNumber    = orderlist.OrderNumber;
                        invoicelist.BelongArea     = orderlist.WorkArea;
                        invoicelist.PayTime        = orderlist.PayTime;
                        invoicelist.Price          = orderlist.Price;
                        invoicelist.Status         = 1;
                        invoicelist.ContractStatus = 1;
                        invoicelist.UserName       = orderlist.UserName;
                        invoicelist.Type           = 0;
                        DAL.InvoiceList.Add(invoicelist);
                        Model.RTKUserInfo rtkUserInfo = new Model.RTKUserInfo();
                        for (int i = 0; i < orderlist.AccountNum; i++)
                        {
                            Model.RegisterUser registerUser = DAL.RegisterUser.GetModel(orderlist.UserName);

                            System.Random a = new Random(DateTime.Now.Millisecond);
                            // use System.DateTime.Now.Millisecond as seed
                            int RandKey = a.Next(100, 999);
                            Model.CompanyInfo companyInfo = DAL.CompanyInfo.GetModel(Convert.ToInt32(registerUser.CertifiationIndex));
                            rtkUserInfo.RegisterUserName = orderlist.UserName;
                            rtkUserInfo.UserName         = orderlist.UserName + RandKey.ToString();
                            rtkUserInfo.Company          = companyInfo.Company;
                            rtkUserInfo.PassWord         = AES_Key.AESEncrypt(rtkUserInfo.UserName, rtkUserInfo.UserName.PadLeft(16, '0'));
                            rtkUserInfo.UserType         = 0;
                            rtkUserInfo.OrderNumber      = orderlist.OrderNumber;
                            rtkUserInfo.CORSCardNum      = "";
                            rtkUserInfo.BelongArea       = registerUser.BelongArea;
                            rtkUserInfo.Contact          = companyInfo.Contact;
                            rtkUserInfo.ContactPhone     = registerUser.Phone;
                            rtkUserInfo.ContactEmail     = registerUser.Email;

                            rtkUserInfo.RegTime = DateTime.Now;

                            if (!DAL.RTKUserInfo.Exists(rtkUserInfo.UserName))
                            {
                                DAL.RTKUserInfo.Add(rtkUserInfo);
                            }
                            else
                            {
                                //如何已经存在则重新循环一次
                                i = i - 1;
                                continue;
                            }


                            #region 权限信息部分

                            Model.RTKUserPurview rtkUserPurview = new Model.RTKUserPurview();
                            Model.RTKPostPurview rTKPostPurview = new Model.RTKPostPurview();
                            string startTime = DateTime.Now.ToString();

                            rtkUserPurview.UserName   = rtkUserInfo.UserName;
                            rtkUserPurview.StartTime  = DateTime.Now;
                            rtkUserPurview.EndTime    = DateTime.Now.AddMonths(Convert.ToInt32(orderlist.ServiceDuration));
                            rtkUserPurview.ServerType = orderlist.ServerType;

                            string CoorSystem  = "";
                            string SourceTable = "";
                            rtkUserPurview.VRSEnable   = 1;
                            rtkUserPurview.SourceTable = SourceTable;
                            rtkUserPurview.CoorSystem  = CoorSystem;
                            if (orderlist.RoamID == "" || orderlist.RoamID == null)
                            {
                                rtkUserPurview.RoamID = "";
                            }
                            else
                            {
                                rtkUserPurview.RoamID = orderlist.RoamID;
                            }

                            if (orderlist.ElevationEnable == 1)
                            {
                                rtkUserPurview.ElevationEnable = 1;
                            }
                            else
                            {
                                rtkUserPurview.ElevationEnable = 0;
                            }


                            rTKPostPurview.UserName  = rtkUserInfo.UserName;
                            rTKPostPurview.StartTime = DateTime.Now;
                            rTKPostPurview.EndTime   = DateTime.Now.AddMonths(Convert.ToInt32(orderlist.ServiceDuration));
                            DAL.RTKPostPurview.Add(rTKPostPurview);
                            DAL.RTKUserPurview.Add(rtkUserPurview);

                            companyInfo.Balance = companyInfo.Balance - Convert.ToSingle(orderlist.Price);
                            DAL.CompanyInfo.Update2(companyInfo);
                            #endregion
                        }
                    }
                    if (orderlist.OrdeType == 3)//账号申请(自定义账号)
                    {
                        //订单审核通过后添加发票信息
                        Model.InvoiceList invoicelist = new Model.InvoiceList();
                        invoicelist.OrderDetail    = orderlist.ID.ToString();
                        invoicelist.OrderNumber    = orderlist.OrderNumber;
                        invoicelist.BelongArea     = orderlist.WorkArea;
                        invoicelist.PayTime        = orderlist.PayTime;
                        invoicelist.Price          = orderlist.Price;
                        invoicelist.Status         = 1;
                        invoicelist.ContractStatus = 1;
                        invoicelist.UserName       = orderlist.UserName;
                        invoicelist.Type           = 0;
                        DAL.InvoiceList.Add(invoicelist);
                        Model.RTKUserInfo rtkUserInfo = new Model.RTKUserInfo();


                        Model.RegisterUser registerUser = DAL.RegisterUser.GetModel(orderlist.UserName);
                        Model.CompanyInfo  companyInfo  = DAL.CompanyInfo.GetModel(Convert.ToInt32(registerUser.CertifiationIndex));

                        DataSet ds = DAL.DeUserInfo.GetList(orderlist.OrderNumber);
                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            rtkUserInfo.RegisterUserName = orderlist.UserName;
                            rtkUserInfo.UserName         = ds.Tables[0].Rows[i]["UserName"].ToString();
                            rtkUserInfo.Company          = companyInfo.Company;
                            rtkUserInfo.PassWord         = AES_Key.AESEncrypt(rtkUserInfo.UserName, rtkUserInfo.UserName.PadLeft(16, '0'));
                            rtkUserInfo.UserType         = 0;
                            rtkUserInfo.OrderNumber      = orderlist.OrderNumber;
                            rtkUserInfo.BelongArea       = registerUser.BelongArea;
                            rtkUserInfo.Contact          = companyInfo.Contact;
                            rtkUserInfo.ContactPhone     = registerUser.Phone;
                            rtkUserInfo.ContactEmail     = registerUser.Email;
                            rtkUserInfo.CORSCardNum      = "";
                            rtkUserInfo.RegTime          = DateTime.Now;

                            if (!DAL.RTKUserInfo.Exists(rtkUserInfo.UserName))
                            {
                                DAL.RTKUserInfo.Add(rtkUserInfo);
                            }
                            else
                            {
                                //如何已经存在则重新循环一次
                                i = i - 1;
                                continue;
                            }


                            #region 权限信息部分

                            Model.RTKUserPurview rtkUserPurview = new Model.RTKUserPurview();
                            Model.RTKPostPurview rTKPostPurview = new Model.RTKPostPurview();
                            string startTime = DateTime.Now.ToString();

                            rtkUserPurview.UserName   = rtkUserInfo.UserName;
                            rtkUserPurview.StartTime  = DateTime.Now;
                            rtkUserPurview.EndTime    = DateTime.Now.AddMonths(Convert.ToInt32(orderlist.ServiceDuration));
                            rtkUserPurview.ServerType = orderlist.ServerType;

                            string CoorSystem  = "";
                            string SourceTable = "";
                            rtkUserPurview.VRSEnable   = 1;
                            rtkUserPurview.SourceTable = SourceTable;
                            rtkUserPurview.CoorSystem  = CoorSystem;
                            if (orderlist.RoamID == "" || orderlist.RoamID == null)
                            {
                                rtkUserPurview.RoamID = "";
                            }
                            else
                            {
                                rtkUserPurview.RoamID = orderlist.RoamID;
                            }

                            if (orderlist.ElevationEnable == 1)
                            {
                                rtkUserPurview.ElevationEnable = 1;
                            }
                            else
                            {
                                rtkUserPurview.ElevationEnable = 0;
                            }


                            rTKPostPurview.UserName  = rtkUserInfo.UserName;
                            rTKPostPurview.StartTime = DateTime.Now;
                            rTKPostPurview.EndTime   = DateTime.Now.AddMonths(Convert.ToInt32(orderlist.ServiceDuration));
                            DAL.RTKPostPurview.Add(rTKPostPurview);
                            DAL.RTKUserPurview.Add(rtkUserPurview);


                            #endregion
                        }
                        companyInfo.Balance = companyInfo.Balance - Convert.ToSingle(orderlist.Price);
                        DAL.CompanyInfo.Update2(companyInfo);
                        Model.PaymentRecord paymentRecord = new Model.PaymentRecord();
                        paymentRecord.ProductName  = "账号申请";
                        paymentRecord.Company      = orderlist.company;
                        paymentRecord.Type         = orderlist.OrdeType;
                        paymentRecord.Money        = "-" + orderlist.Price;
                        paymentRecord.RechargeTime = DateTime.Now;
                        paymentRecord.UserName     = orderlist.UserName;
                        DAL.PaymentRecord.Add(paymentRecord);
                    }
                    if (orderlist.OrdeType == 1)//账号续费
                    {
                        Model.InvoiceList invoicelist = new Model.InvoiceList();
                        invoicelist.OrderDetail    = orderlist.ID.ToString();
                        invoicelist.OrderNumber    = orderlist.OrderNumber;
                        invoicelist.BelongArea     = orderlist.WorkArea;
                        invoicelist.PayTime        = orderlist.PayTime;
                        invoicelist.Price          = orderlist.Price;
                        invoicelist.Status         = 1;
                        invoicelist.ContractStatus = 1;
                        invoicelist.UserName       = orderlist.UserName;
                        invoicelist.Type           = 1;
                        DAL.InvoiceList.Add(invoicelist);
                        string   a      = orderlist.OrderContent;
                        string   name   = orderlist.OrderContent.Substring(4);
                        Regex    regex  = new Regex(";");//以  [##]  分割
                        string[] result = regex.Split(name);
                        for (int i = 0; i < result.Length; i++)
                        {
                            if (result[i] != "")
                            {
                                Model.RTKUserPurview rtkUserPurview = DAL.RTKUserPurview.GetModel(result[i]);
                                Model.RTKPostPurview rTKPostPurview = DAL.RTKPostPurview.GetModel(result[i]);

                                rtkUserPurview.UserName = result[i];


                                rtkUserPurview.EndTime = rtkUserPurview.EndTime.AddMonths(Convert.ToInt32(orderlist.ServiceDuration));


                                rTKPostPurview.UserName = result[i];
                                rTKPostPurview.EndTime  = rTKPostPurview.EndTime.AddMonths(Convert.ToInt32(orderlist.ServiceDuration));
                                DAL.RTKPostPurview.Update1(rTKPostPurview);
                                DAL.RTKUserPurview.Update1(rtkUserPurview);
                            }
                        }
                        Model.CompanyInfo companyInfo = DAL.CompanyInfo.GetModel(orderlist.company);
                        companyInfo.Balance = companyInfo.Balance - Convert.ToSingle(orderlist.Price);
                        DAL.CompanyInfo.Update2(companyInfo);
                        Model.PaymentRecord paymentRecord = new Model.PaymentRecord();
                        paymentRecord.ProductName  = "账号续费";
                        paymentRecord.Company      = orderlist.company;
                        paymentRecord.Type         = orderlist.OrdeType;
                        paymentRecord.Money        = "-" + orderlist.Price;
                        paymentRecord.RechargeTime = DateTime.Now;
                        paymentRecord.UserName     = orderlist.UserName;
                        DAL.PaymentRecord.Add(paymentRecord);
                    }
                    if (orderlist.OrdeType == 2)//账号充值
                    {
                        Model.InvoiceList invoicelist = new Model.InvoiceList();
                        invoicelist.OrderDetail    = orderlist.ID.ToString();
                        invoicelist.OrderNumber    = orderlist.OrderNumber;
                        invoicelist.BelongArea     = orderlist.WorkArea;
                        invoicelist.PayTime        = orderlist.PayTime;
                        invoicelist.Price          = orderlist.Price;
                        invoicelist.Status         = 1;
                        invoicelist.ContractStatus = 1;
                        invoicelist.UserName       = orderlist.UserName;
                        invoicelist.Type           = 2;
                        DAL.InvoiceList.Add(invoicelist);

                        Model.CompanyInfo companyInfo = DAL.CompanyInfo.GetModel(orderlist.company);
                        companyInfo.Balance += Convert.ToSingle(orderlist.Price);
                        DAL.CompanyInfo.Update2(companyInfo);
                        Model.PaymentRecord paymentRecord = new Model.PaymentRecord();
                        paymentRecord.ProductName  = "账号充值";
                        paymentRecord.Company      = orderlist.company;
                        paymentRecord.Type         = orderlist.OrdeType;
                        paymentRecord.Money        = orderlist.Price;
                        paymentRecord.RechargeTime = DateTime.Now;
                        paymentRecord.UserName     = orderlist.UserName;
                        DAL.PaymentRecord.Add(paymentRecord);
                    }
                }
                else
                {
                    orderlist.OrderStatus = 3;
                }
                DAL.OrderList.Update(orderlist);
                return(true);
            }
            catch (System.Threading.ThreadAbortException)
            {
                return(true);
            }
            catch (Exception ex)
            {
                cs.WebLogger.WriteErroLog(ex.ToString());    //输出到文件中
                //Response.Write("<script>alert(\"1\")</script>");
                return(true);
            }
        }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["name"] != null)
            {
                Session["RegisterUserName"] = Request["name"].ToString();
            }

            DataSet ds = DAL.CoorSysPars.GetList("YSZBXM ='WGS84'");

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                ssdfzbx.Items.Add(dr["MDZBXM"].ToString());
                ssdfzbx1.Items.Add(dr["MDZBXM"].ToString());
            }

            DataSet ds1 = DAL.SourceTable.GetList("1=1");

            foreach (DataRow dr in ds1.Tables[0].Rows)
            {
                ssylbpz.Items.Add(dr["Source"].ToString());
                ssylbpz1.Items.Add(dr["Source"].ToString());
            }

            int companyCertifiationIndex = Convert.ToInt32(DAL.RegisterUser.GetModel(Session["RegisterUserName"].ToString()).CertifiationIndex);

            Model.CompanyInfo  companyInfo  = DAL.CompanyInfo.GetModel(companyCertifiationIndex);
            Model.RegisterUser registerUser = DAL.RegisterUser.GetModel(Session["RegisterUserName"].ToString());


            Company.Value  = companyInfo.Company;
            Contacts.Value = companyInfo.Contact;
            phone.Value    = registerUser.Phone;
            email.Value    = registerUser.Email;


            Company1.Value  = companyInfo.Company;
            Contacts1.Value = companyInfo.Contact;
            phone1.Value    = registerUser.Phone;
            email1.Value    = registerUser.Email;



            if (Request["action"] != null)
            {
                if (Request["action"].ToString() == "check")
                {
                    string           username = Request["data"].ToString();
                    DAL.RegisterUser du       = new DAL.RegisterUser();
                    if (DAL.RTKUserInfo.GetModel(username) == null && DAL.RegisterUser.GetModel(username) == null)
                    {
                        Response.Clear();
                        Response.Write("1");
                        Response.End();
                    }
                    else
                    {
                        Response.Clear();
                        Response.Write("0");
                        Response.End();
                    }
                }

                if (Request["action"].ToString() == "AddUser")
                {
                    bool dele = true;

                    string UserName = Request.Form["username"].ToString();

                    try
                    {
                        // 个人信息部分
                        DAL.RegisterUser du1 = new DAL.RegisterUser();
                        if (DAL.RTKUserInfo.GetModel(UserName) == null && DAL.RegisterUser.GetModel(UserName) == null)
                        {
                        }
                        else
                        {
                            dele = false;
                            Response.Clear();
                            Response.Write("-1");
                            Response.End();
                            return;
                        }

                        string PassWord = Request.Form["password"].ToString();
                        string WorkType = Request.Form["WorkType"].ToString();
                        string Contacts = Request.Form["Contacts"].ToString();
                        string Phone    = Request.Form["phone"].ToString();
                        string Email    = Request.Form["email"].ToString();
                        string Company  = Request.Form["Company"].ToString();

                        int Enable = int.Parse(Request.Form["status"].ToString());
                        Model.RTKUserInfo rtkUserInfo = new Model.RTKUserInfo();

                        rtkUserInfo.RegisterUserName = Session["RegisterUserName"].ToString();
                        rtkUserInfo.UserName         = UserName;
                        rtkUserInfo.Company          = Company;
                        rtkUserInfo.PassWord         = AES_Key.AESEncrypt(PassWord, UserName.PadLeft(16, '0'));
                        rtkUserInfo.UserType         = 0;
                        //rtkUserInfo.OrderNumber = ;
                        // rtkUserInfo.BelongArea = registerUser.BelongArea;
                        rtkUserInfo.Contact      = Contacts;
                        rtkUserInfo.ContactPhone = Phone;
                        rtkUserInfo.ContactEmail = Email;
                        rtkUserInfo.RegTime      = DateTime.Now;
                        rtkUserInfo.CORSCardNum  = "";
                        if (DAL.RTKUserInfo.Add(rtkUserInfo))
                        {
                        }
                        else
                        {
                            Response.Clear();
                            Response.Write("0");
                            Response.End();
                            return;
                        }


                        // 权限信息部分

                        Model.RTKUserPurview mrtkp = new Model.RTKUserPurview();
                        int    PostEnable          = int.Parse(Request.Form["ssfwky"].ToString());
                        string StartTime           = Request.Form["ssbsks"].ToString();
                        string EndTime             = Request.Form["ssbsjs"].ToString();
                        string CoorSystem          = Request.Form["sskyzbx"].ToString();
                        string SourceTable         = Request.Form["sskyylb"].ToString();
                        int    ElevationEnable     = int.Parse(Request.Form["sszcghq"].ToString());
                        string ElevationMode       = Request.Form["ssgcjz"].ToString();
                        mrtkp.AreaID          = "";
                        mrtkp.ElevationEnable = ElevationEnable;
                        mrtkp.ElevationMode   = ElevationMode;
                        mrtkp.SourceTable     = SourceTable;
                        mrtkp.UserName        = UserName;
                        mrtkp.VRSEnable       = PostEnable;
                        mrtkp.ServerType      = WorkType;
                        mrtkp.CoorSystem      = CoorSystem;
                        mrtkp.RoamID          = "";
                        mrtkp.StartTime       = Convert.ToDateTime(StartTime);
                        mrtkp.EndTime         = Convert.ToDateTime(EndTime);

                        if (!DAL.RTKUserPurview.Exists(mrtkp.UserName))
                        {
                            if (!DAL.RTKUserPurview.Add(mrtkp))
                            {
                                DAL.RTKUserInfo.Delete(UserName);
                                Response.Clear();
                                Response.Write("0");
                                Response.End();
                                return;
                            }
                        }
                        Model.RTKPostPurview rTKPostPurview = new Model.RTKPostPurview();
                        rTKPostPurview.UserName          = UserName;
                        rTKPostPurview.CoorTransEnable   = 0;
                        rTKPostPurview.HeightTransEnable = 0;
                        rTKPostPurview.SHPTransEnable    = 0;
                        rTKPostPurview.DXFTransEnable    = 0;
                        rTKPostPurview.PPPserverEnable   = 0;
                        rTKPostPurview.ObsQualityEnable  = 0;
                        rTKPostPurview.BaseLineEnable    = 0;


                        rTKPostPurview.StartTime = Convert.ToDateTime(StartTime);
                        rTKPostPurview.EndTime   = Convert.ToDateTime(EndTime);
                        DAL.RTKPostPurview.Add(rTKPostPurview);

                        //添加用户状态信息
                        Model.RTKUserStatus mrtks = new Model.RTKUserStatus();
                        mrtks.UserName  = UserName;
                        mrtks.Company   = Company;
                        mrtks.IsOnline  = 0;
                        mrtks.Lat       = 0;
                        mrtks.Lon       = 0;
                        mrtks.StartTime = Convert.ToDateTime(StartTime);
                        mrtks.Remark    = "";
                        DAL.RTKUserStatus bllrtkus = new DAL.RTKUserStatus();

                        if (!bllrtkus.Exists(UserName))
                        {
                            if (DAL.RTKUserStatus.Add(mrtks))
                            {
                            }
                        }

                        Model.OrderList orderList = new Model.OrderList();
                        orderList.UserName     = Session["RegisterUserName"].ToString();
                        orderList.OrderNumber  = DateTime.Now.ToString("yyyMMddhhmmssfff");
                        orderList.company      = Company;
                        orderList.Price        = "1000";
                        orderList.DealTime     = DateTime.Now;
                        orderList.OrderContent = "账号申请";
                        orderList.OrderStatus  = 2;
                        orderList.OrdeType     = 0;
                        orderList.RoamID       = "";
                        DAL.OrderList.Add(orderList);
                        //修改单位余额
                        Model.CompanyInfo UpdatecompanyInfo = DAL.CompanyInfo.GetModel(Company);
                        UpdatecompanyInfo.Balance = UpdatecompanyInfo.Balance - 1000;
                        DAL.CompanyInfo.Update(UpdatecompanyInfo);

                        //添加发票信息
                        Model.InvoiceList invoicelist = new Model.InvoiceList();
                        invoicelist.OrderDetail    = orderList.ID.ToString();
                        invoicelist.OrderNumber    = orderList.OrderNumber;
                        invoicelist.BelongArea     = orderList.WorkArea;
                        invoicelist.PayTime        = orderList.PayTime;
                        invoicelist.Price          = orderList.Price;
                        invoicelist.Status         = 1;
                        invoicelist.ContractStatus = 1;
                        invoicelist.UserName       = orderList.UserName;
                        DAL.InvoiceList.Add(invoicelist);
                        //添加缴费记录
                        Model.PaymentRecord paymentRecord = new Model.PaymentRecord();
                        paymentRecord.ProductName  = "账号申请";
                        paymentRecord.Company      = Company;
                        paymentRecord.Type         = orderList.OrdeType;
                        paymentRecord.Money        = "-" + orderList.Price;
                        paymentRecord.RechargeTime = DateTime.Now;
                        paymentRecord.UserName     = orderList.UserName;
                        DAL.PaymentRecord.Add(paymentRecord);
                    }


                    catch {
                        DAL.RTKUserInfo.Delete(UserName);
                        DAL.RTKUserPurview.Delete(UserName);
                        DAL.RTKUserStatus.Delete(UserName);
                        DAL.RTKPostPurview.Delete(UserName);
                        DAL.InvoiceList.Delete(UserName);
                        Response.Clear();
                        Response.Write("0");
                        Response.End();
                        return;
                    }
                    Response.Clear();
                    Response.Write("1");
                    Response.End();
                }

                if (Request["action"].ToString() == "AddUser1")
                {
                    bool dele = true;


                    for (int i = 0; i < Convert.ToInt32(AccountNumber.Value); i++)
                    {
                        int[]  RandKey  = cs.RandomNumber.UseHashTableToNonRepeatedRandom(4, 0, 9);
                        string UserName = Session["RegisterUserName"].ToString() + string.Join("", RandKey);
                        try
                        {
                            // 个人信息部分
                            DAL.RegisterUser du1 = new DAL.RegisterUser();
                            if (DAL.RTKUserInfo.GetModel(UserName) == null && DAL.RegisterUser.GetModel(UserName) == null)
                            {
                            }
                            else
                            {
                                dele = false;
                                Response.Clear();
                                Response.Write("-1");
                                Response.End();
                                return;
                            }

                            string PassWord = UserName;
                            string WorkType = Request.Form["WorkType1"].ToString();
                            string Contacts = Request.Form["Contacts1"].ToString();
                            string Phone    = Request.Form["phone1"].ToString();
                            string Email    = Request.Form["email1"].ToString();
                            string Company  = Request.Form["Company1"].ToString();

                            int Enable = int.Parse(Request.Form["status1"].ToString());
                            Model.RTKUserInfo rtkUserInfo = new Model.RTKUserInfo();

                            rtkUserInfo.RegisterUserName = Session["RegisterUserName"].ToString();
                            rtkUserInfo.UserName         = UserName;
                            rtkUserInfo.Company          = Company;
                            rtkUserInfo.PassWord         = AES_Key.AESEncrypt(PassWord, UserName.PadLeft(16, '0'));
                            rtkUserInfo.UserType         = 0;
                            //rtkUserInfo.OrderNumber = ;
                            // rtkUserInfo.BelongArea = registerUser.BelongArea;
                            rtkUserInfo.Contact      = Contacts;
                            rtkUserInfo.ContactPhone = Phone;
                            rtkUserInfo.ContactEmail = Email;
                            rtkUserInfo.RegTime      = DateTime.Now;
                            rtkUserInfo.CORSCardNum  = "";
                            if (DAL.RTKUserInfo.Add(rtkUserInfo))
                            {
                            }
                            else
                            {
                                Response.Clear();
                                Response.Write("0");
                                Response.End();
                                return;
                            }


                            // 权限信息部分

                            Model.RTKUserPurview mrtkp = new Model.RTKUserPurview();
                            int    PostEnable          = int.Parse(Request.Form["ssfwky1"].ToString());
                            string StartTime           = Request.Form["ssbsks1"].ToString();
                            string EndTime             = Request.Form["ssbsjs1"].ToString();
                            string CoorSystem          = Request.Form["sskyzbx1"].ToString();
                            string SourceTable         = Request.Form["sskyylb1"].ToString();
                            int    ElevationEnable     = int.Parse(Request.Form["sszcghq1"].ToString());
                            string ElevationMode       = Request.Form["ssgcjz1"].ToString();
                            mrtkp.AreaID          = "";
                            mrtkp.ElevationEnable = ElevationEnable;
                            mrtkp.ElevationMode   = ElevationMode;
                            mrtkp.SourceTable     = SourceTable;
                            mrtkp.UserName        = UserName;
                            mrtkp.VRSEnable       = PostEnable;
                            mrtkp.ServerType      = WorkType;
                            mrtkp.CoorSystem      = CoorSystem;
                            mrtkp.RoamID          = "";
                            mrtkp.StartTime       = Convert.ToDateTime(StartTime);
                            mrtkp.EndTime         = Convert.ToDateTime(EndTime);
                            mrtkp.RoamID          = "";

                            if (!DAL.RTKUserPurview.Exists(mrtkp.UserName))
                            {
                                if (!DAL.RTKUserPurview.Add(mrtkp))
                                {
                                    DAL.RTKUserInfo.Delete(UserName);
                                    Response.Clear();
                                    Response.Write("0");
                                    Response.End();
                                    return;
                                }
                            }
                            Model.RTKPostPurview rTKPostPurview = new Model.RTKPostPurview();
                            rTKPostPurview.UserName          = UserName;
                            rTKPostPurview.CoorTransEnable   = 0;
                            rTKPostPurview.HeightTransEnable = 0;
                            rTKPostPurview.SHPTransEnable    = 0;
                            rTKPostPurview.DXFTransEnable    = 0;
                            rTKPostPurview.PPPserverEnable   = 0;
                            rTKPostPurview.ObsQualityEnable  = 0;
                            rTKPostPurview.BaseLineEnable    = 0;

                            rTKPostPurview.StartTime = Convert.ToDateTime(StartTime);
                            rTKPostPurview.EndTime   = Convert.ToDateTime(EndTime);
                            DAL.RTKPostPurview.Add(rTKPostPurview);

                            //添加用户状态信息
                            Model.RTKUserStatus mrtks = new Model.RTKUserStatus();
                            mrtks.UserName  = UserName;
                            mrtks.Company   = Company;
                            mrtks.IsOnline  = 0;
                            mrtks.Lat       = 0;
                            mrtks.Lon       = 0;
                            mrtks.StartTime = Convert.ToDateTime(StartTime);
                            mrtks.Remark    = "";
                            DAL.RTKUserStatus bllrtkus = new DAL.RTKUserStatus();

                            if (!bllrtkus.Exists(UserName))
                            {
                                if (DAL.RTKUserStatus.Add(mrtks))
                                {
                                }
                            }

                            Model.OrderList orderList = new Model.OrderList();
                            orderList.UserName     = Session["RegisterUserName"].ToString();
                            orderList.OrderNumber  = DateTime.Now.ToString("yyyMMddhhmmssfff");
                            orderList.company      = Company;
                            orderList.Price        = "1000";
                            orderList.DealTime     = DateTime.Now;
                            orderList.OrderContent = "账号申请";
                            orderList.OrderStatus  = 2;
                            orderList.OrdeType     = 0;
                            orderList.RoamID       = "";
                            DAL.OrderList.Add(orderList);
                            //修改单位余额
                            Model.CompanyInfo UpdatecompanyInfo = DAL.CompanyInfo.GetModel(Company);
                            UpdatecompanyInfo.Balance = UpdatecompanyInfo.Balance - 1000;
                            DAL.CompanyInfo.Update(UpdatecompanyInfo);

                            //添加发票信息
                            Model.InvoiceList invoicelist = new Model.InvoiceList();
                            invoicelist.OrderDetail    = orderList.ID.ToString();
                            invoicelist.OrderNumber    = orderList.OrderNumber;
                            invoicelist.BelongArea     = orderList.WorkArea;
                            invoicelist.PayTime        = orderList.PayTime;
                            invoicelist.Price          = orderList.Price;
                            invoicelist.Status         = 1;
                            invoicelist.ContractStatus = 1;
                            invoicelist.UserName       = orderList.UserName;
                            DAL.InvoiceList.Add(invoicelist);
                            //添加缴费记录
                            Model.PaymentRecord paymentRecord = new Model.PaymentRecord();
                            paymentRecord.ProductName  = "账号申请";
                            paymentRecord.Company      = Company;
                            paymentRecord.Type         = orderList.OrdeType;
                            paymentRecord.Money        = "-" + orderList.Price;
                            paymentRecord.RechargeTime = DateTime.Now;
                            paymentRecord.UserName     = orderList.UserName;
                            DAL.PaymentRecord.Add(paymentRecord);
                        }


                        catch
                        {
                            DAL.RTKUserInfo.Delete(UserName);
                            DAL.RTKUserPurview.Delete(UserName);
                            DAL.RTKUserStatus.Delete(UserName);
                            DAL.RTKPostPurview.Delete(UserName);
                            DAL.InvoiceList.Delete(UserName);
                            Response.Clear();
                            Response.Write("0");
                            Response.End();
                            return;
                        }
                    }
                    Response.Clear();
                    Response.Write("1");
                    Response.End();
                }
            }
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["action"].ToString() == "transferInvoiceListId" && Request["id"] != null)
            {
                contract.Style.Add("display", "none");
                submitContractFile.Style.Add("display", "none");
                string ff = Request["id"].ToString();
                invoiceListId = Convert.ToInt32(Request["id"].ToString());
                Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(invoiceListId);
                invoiceHead.Value = DAL.InvoiceInfo.GetModel(Convert.ToInt32(invoiceList.InvoiceInfoIndex)).Invoice;
                taxNum.Value      = DAL.InvoiceInfo.GetModel(Convert.ToInt32(invoiceList.InvoiceInfoIndex)).TaxNum;

                if (invoiceList.Status == 4 && invoiceList.InvoiceFile != "")
                {
                    invoiceFile.Src    = invoiceList.InvoiceFile;
                    invoiceFile.Height = 500;
                    invoiceFile.Width  = 1000;
                }
            }
            //else if (Request["action"].ToString() == "transferContractListId" && Request["id"] != null)
            //{
            //    invoice.Style.Add("display", "none");
            //    submitInvoiceFile.Style.Add("display", "none");

            //    string ff = Request["id"].ToString();
            //    invoiceListId = Convert.ToInt32(Request["id"].ToString());
            //    Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(invoiceListId);
            //    invoiceHead.Value = DAL.InvoiceInfo.GetModel(Convert.ToInt32(invoiceList.InvoiceInfoIndex)).Invoice;
            //    taxNum.Value = DAL.InvoiceInfo.GetModel(Convert.ToInt32(invoiceList.InvoiceInfoIndex)).TaxNum;
            //    if (invoiceList.Status==4)
            //    {
            //        invoiceFile.Src = invoiceList.ContractFile;
            //        invoiceFile.Height = 500;
            //        invoiceFile.Width = 1000;
            //    }
            //}

            else
            {
            }
            if (Request["action"] != null && Request["action"] == "AddData")
            {
                AddData();
            }
            if (Request["action"] != null && Request["action"] == "OK")
            {
                Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(invoiceListId);
                invoiceList.InvoiceFile = invoice_path;
                invoiceList.Status      = 4;
                DAL.InvoiceList.Update(invoiceList);
                Response.Write("1");
                Response.End();
            }
            //if (Request["action"] != null && Request["action"] == "OK" && invoice_path == "")
            //{
            //    Model.InvoiceList invoiceList = DAL.InvoiceList.GetModel(invoiceListId);
            //    invoiceList.ContractFile = invoice_path;
            //    invoiceList.ContractStatus = 4;
            //    DAL.InvoiceList.Update(invoiceList);
            //    Response.Write("1");
            //    Response.End();
            //}
        }