/// <summary>
 /// 直接保存并提交数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         Save();
         //生成新的工作流实例
         string FirstStepName = "";
         bool HasFlow = new CaseCheck().InsertCase("ReportBoxMonthYearEdit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                       Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                        Convert.ToString(Session["CompanyName"]), out FirstStepName);
         if (!HasFlow) //不存在相应的工作流
         {
             CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');");
         }
         else  //将第一个步骤名称插入状态表中
         {
             new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
         }
         CallJsFun("alert('成功保存并提交');");
         Response.Redirect("ReportBoxMonthYearList.aspx");
     }
     catch (Exception ex)
     {
         ShowJsMessage(ex.Message);
     }
 }
        /// <summary>
        /// 提交数据事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            SaveDate();
            //提交信息,需要判断,如果是暂停,则不需要生产新的工作流实例
            if (Convert.ToString(ViewState["CurrStatus"]) == "4")
            {
                //暂停状态,重新提交数据时,只需要更新数据状态,从"4"转换成"1"
                new CawDataStatusDB().Update(Convert.ToString(ViewState["Guid"]), "1");
            }
            else  //生成新的工作流实例
            {
                string FirstStepName = "";
                bool HasFlow = new CaseCheck().InsertCase("Caw_Bank_PreDesign_Edit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                              Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                               Convert.ToString(Session["CompanyName"]), out FirstStepName);
                if (!HasFlow) //不存在相应的工作流
                {
                    CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
                }
                else  //将第一个步骤名称插入状态表中
                {
                    new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
                }

            }
            CallJsFun("alert('保存并提交成功.');window.close();");
        }
        /// <summary>
        /// �ύ�����¼�
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            SaveDate();
            //�ύ��Ϣ����Ҫ�жϣ��������ͣ������Ҫ�����µĹ�����ʵ��
            if (Convert.ToString(ViewState["CurrStatus"]) == "4")
            {
                //��ͣ״̬�������ύ����ʱ��ֻ��Ҫ��������״̬����"4"ת����"1"
                new CawDataStatusDB().Update(Convert.ToString(ViewState["Guid"]), "1");
            }
            else  //�����µĹ�����ʵ��
            {
                string FirstStepName = "";
                bool HasFlow = new CaseCheck().InsertCase("ReportInfo_Edit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                              Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                               Convert.ToString(Session["CompanyName"]), out FirstStepName);
                if (!HasFlow) //��������Ӧ�Ĺ�����
                {
                    CallJsFun("alert('���ݱ���ɹ�.����������Ӧ���������ã�����ϵ����Ա���Ժ������ύ.');window.close();");
                }
                else  //����һ���������Ʋ���״̬����
                {
                    new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
                }

            }
            CallJsFun("alert('���沢�ύ�ɹ�.');window.close();");
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 审批通过
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnOK_Click(object sender, EventArgs e)
        {
            string KeyWord = Convert.ToString(Request.QueryString["Guid"]);
            string UserGuid = Session["UserID"].ToString();
            string UserName = Session["RealName"].ToString();

            if (rbPass.Checked)
            {
                string NextStepName="";
                bool IsEnd = new CaseCheck().CheckPass(KeyWord, txtCheckOpion.Text, UserGuid, UserName, out NextStepName);
                //,如果是最后一个审批点,更改CAW_ DateStatus中的DATASTATUS和CHECKOPION
                if (IsEnd)
                {
                    new CawDataStatusDB().Update(KeyWord, "2", txtCheckOpion.Text,"审批通过");
                }
                else
                {
                    new CawDataStatusDB().Update(KeyWord, "1", txtCheckOpion.Text, NextStepName);
                }
              //  ShowJsMessage("审批通过成功.");
                CallJsFun("alert('审批通过成功.'); window.location='/Pages/MainPage.aspx';");
            }
            else if (rbBack.Checked)
            {
                 string BackStepName="";
                 bool IsBegin = new CaseCheck().CheckBack(KeyWord, txtCheckOpion.Text, UserGuid, UserName, out BackStepName);
                //如果回退到开始,则需要更改CAW_ DateStatus中的DATASTATUS和CHECKOPION
                 if (IsBegin)
                 {
                     new CawDataStatusDB().Update(KeyWord, "3", txtCheckOpion.Text, "退回");
                 }
                 else
                 {
                     //应非退回到提交者本人,因此审批意见为空
                     new CawDataStatusDB().Update(KeyWord, "1", "",  BackStepName+ "(退回重审)");
                 }
               // ShowJsMessage("审批回退成功.");
                 CallJsFun("alert('审批回退成功.'); window.location='/Pages/MainPage.aspx';");
            }
            else if (rbPause.Checked)
            {
                bool CanEdit = chbCanEdit.Checked;
                new CaseCheck().CheckPause(KeyWord, txtCheckOpion.Text, CanEdit, UserGuid, UserName);
                //如果需要修改数据,则将更改CAW_ DateStatus中的DATASTATUS和CHECKOPION
                if (CanEdit)
                {
                    new CawDataStatusDB().Update(KeyWord, "4", txtCheckOpion.Text,"(暂停需修改)");
                }

             //   ShowJsMessage("审批暂停成功.");
                CallJsFun("alert('审批暂停成功.'); window.location='/Pages/MainPage.aspx';");
            }
        }
 /// <summary>
 /// 直接保存并提交数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     SaveDate();
     //生成新的工作流实例
     string FirstStepName = "";
     bool HasFlow = new CaseCheck().InsertCase("Caw_CompanyBussiness_Edit.aspx", ViewState["Guid"].ToString(), Convert.ToString(Session["UserID"]),
                                                   Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                    Convert.ToString(Session["CompanyName"]), out FirstStepName);
     if (!HasFlow) //不存在相应的工作流
     {
         CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
     }
     else  //将第一个步骤名称插入状态表中
     {
         new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
     }
     CallJsFun("alert('成功保存并提交');window.close();");
 }
        /// <summary>
        /// 保存数据,同时更新数据状态
        /// </summary>
        protected void SaveDate(int per)
        {
            string DealGuid = ViewState["Guid"].ToString();
            string StartGuid = Request.QueryString["guid"].ToString();
            string CompanyGuid = Session["ORGID"].ToString();
            string CompanyName = Session["CompanyName"].ToString();
            string ShipName = this.txtShipName.Text.Trim();
            string Nationnality = this.txtShipNation.Text.Trim();
            string Code = this.txtCode.Text.Trim();
            string ArriveDate = this.dtxtArriveDate.Text.Trim();
            string DealGoodDate = this.dtbDealDate.Text.Trim();
            string CargoType = this.rbtCargoType.SelectedItem.Value.Trim();
            string TradeType = this.rbtTradeType.SelectedItem.Value.Trim();
            string CargoName = this.txtCargoName.Text.Trim();
            int CargoPiece = Convert.ToInt32(this.ntbPiece.Text.Trim());
            int Empty20 = Convert.ToInt32(this.ntbEmrty20.Text.Trim());
            int Empty40 = Convert.ToInt32(this.ntbEmrty40.Text.Trim());
            int Empty45 = Convert.ToInt32(this.ntbEmrty45.Text.Trim());
            decimal EmptyTotal = Convert.ToDecimal(this.ntbEmrtyTotal.Text.Trim());
            int Weighty20 = Convert.ToInt32(this.ntbWeighty20.Text.Trim());
            int Weighty40 = Convert.ToInt32(this.ntbWeighty40.Text.Trim());
            int Weighty45 = Convert.ToInt32(this.ntbWeighty45.Text.Trim());
            decimal WeightyTotal = Convert.ToDecimal(this.ntbWeightyTotal.Text.Trim());
            decimal CargoWeigth = this.rbtCargoType.SelectedIndex == 0 ? Convert.ToDecimal(this.ntbWeight.Text.Trim()) : Convert.ToDecimal(this.ntbConWeight.Text.Trim()); ;
            decimal ContainerTotal = Convert.ToDecimal(this.ntbContainerTotal.Text.Trim());
            string Remark = this.txtREMARK.Text.Trim();

            new CawInfoDealGoods().Update(DealGuid, Code, ArriveDate, DealGoodDate, CargoType, TradeType, CargoName, CargoPiece, Empty20, Empty40, Empty45, EmptyTotal, Weighty20, Weighty40, Weighty45, WeightyTotal, CargoWeigth, ContainerTotal, Remark);
            //更新数据状态
            new CawDataStatusDB().UpdateNoSubmit(DealGuid, Session["UserID"].ToString(), Session["RealName"].ToString());

            if (per == 1)
            {
                //提交信息,需要判断,如果是暂停,则不需要生产新的工作流实例
                if (Convert.ToString(ViewState["CurrStatus"]) == "4")
                {
                    //暂停状态,重新提交数据时,只需要更新数据状态,从"4"转换成"1"
                    new CawDataStatusDB().Update(Convert.ToString(ViewState["Guid"]), "1");
                }
                else  //生成新的工作流实例
                {
                    string FirstStepName = "";
                    bool HasFlow = new CaseCheck().InsertCase("Caw_Info_DealGoods_Edit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                                  Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                                   Convert.ToString(Session["CompanyName"]), out FirstStepName);
                    if (!HasFlow) //不存在相应的工作流
                    {
                        CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
                    }
                    else  //将第一个步骤名称插入状态表中
                    {
                        new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
                    }

                }
                if (CargoType == "1")
                    this.CallJsFun("javascript:Is_JZX(1);");
            }
        }
Ejemplo n.º 7
0
 private void SaveData(int oper)
 {
     string DownHarbour = this.txtDownAdd.Text.Trim();
     DateTime EndTime = Convert.ToDateTime(this.dtbEndDate.Text.Trim() + " " + this.ntbEndHour.Text.Trim() + ":" + this.ntbEndMinute.Text.Trim());
     DateTime LeaveTime = Convert.ToDateTime(this.dtbLeaveDate.Text.Trim() + " " + this.ntbLeaveHour.Text.Trim() + ":" + this.ntbLeaveMinute.Text.Trim());
     //插入值
     EndDB.Update(ViewState["Guid"].ToString(), DownHarbour, EndTime, LeaveTime);
     if (this.hidDataStatus.Value != "")
         new CawDataStatusDB().UpdateNoSubmit(ViewState["Guid"].ToString(), Session["UserID"].ToString(), Session["RealName"].ToString());
     else
     //插入状态
     new CawDataStatusDB().Insert(ViewState["Guid"].ToString(), DateTime.Now, Session["RealName"].ToString(), Session["UserID"].ToString(), "0");
     if (oper == 1)
     {
         //提交信息,需要判断,如果是暂停,则不需要生产新的工作流实例
         if (Convert.ToString(ViewState["CurrStatus"]) == "4")
         {
             //暂停状态,重新提交数据时,只需要更新数据状态,从"4"转换成"1"
             new CawDataStatusDB().Update(Convert.ToString(ViewState["Guid"]), "1");
         }
         else  //生成新的工作流实例
         {
             //生成新的工作流实例
             string FirstStepName = "";
             bool HasFlow = new CaseCheck().InsertCase("Caw_End_Add.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                           Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                            Convert.ToString(Session["CompanyName"]), out FirstStepName);
             if (!HasFlow) //不存在相应的工作流
             {
                 if (this.rbtCargoType.SelectedItem.Value == "1")
                     this.CallJsFun("javascript:Is_JZX(1);");
                 CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
             }
             else  //将第一个步骤名称插入状态表中
             {
                 new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
             }
         }
     }
     if (this.rbtCargoType.SelectedItem.Value == "1")
         this.CallJsFun("javascript:Is_JZX(1);");
 }
Ejemplo n.º 8
0
 private void SaveData(int oper)
 {
     string CompanyGuid = this.ddlCorp.SelectedItem.Value.Trim();
     string CompanyName = this.ddlCorp.SelectedItem.Text.Trim();
     //船舶信息
     string ShipGuid = this.hidShipGuid.Value.Trim();
     string ShipName = this.txtShip.Value.Trim();
     string BerthGuid = this.ddlBerth.SelectedItem.Value.Trim();
     string BerthName = this.ddlBerth.SelectedItem.Text.Trim();
     string UpAddress = this.txtUpAdd.Text.Trim();
     string WorkType = this.rbtWorkType.SelectedItem.Value.Trim();
     DateTime DockTime = Convert.ToDateTime(this.dtbDockTime.Text.Trim() + " " + this.ntbDockHour.Text.Trim() + ":" + this.ntbDockMinute.Text.Trim());
     DateTime StartTimie = Convert.ToDateTime(this.dtbStartTime.Text.Trim() + " " + this.ntbStartHour.Text.Trim() + ":" + this.ntbStartMinute.Text.Trim());
     //装卸货物信息
     string CargoType = this.rbtCargoType.SelectedItem.Value.Trim();
     string CargoName = this.txtCargoName.Text.Trim();
     int CargoPiece = Convert.ToInt32(this.ntbPiece.Text.Trim());
     string CargoClassCode1 = this.rbtCargoType.SelectedIndex == 0 ? (this.ttvCargoClass1.Value.Trim() == "" ? "" : this.ttvCargoClass1.Value.Trim()) : "";
     //string CargoClassGuid1 = this.rbtCargoType.SelectedIndex == 0 ? (this.ttvCargoClass1.Value.Trim() == "" ? "" : CCCD.GetGuidByCode(this.ttvCargoClass1.Value.Trim())) : "";
     string CargoClassName1 = this.ttvCargoClass1.Text.Trim();
     string CargoClassCode2 = this.rbtCargoType.SelectedIndex == 0 ? (this.ttvCargoClass2.Value.Trim() == "" ? "" : this.ttvCargoClass2.Value.Trim()) : "";
     //string CargoClassGuid2 = this.rbtCargoType.SelectedIndex == 0 ? CCCD.GetGuidByCode(this.ttvCargoClass2.Value.Trim()) : "";
     string CargoClassName2 = this.ttvCargoClass2.Text.Trim();
     int Empty20 = Convert.ToInt32(this.ntbEmrty20.Text.Trim());
     int Empty40 = Convert.ToInt32(this.ntbEmrty40.Text.Trim());
     int Empty45 = Convert.ToInt32(this.ntbEmrty45.Text.Trim());
     decimal EmptyTotal = Convert.ToDecimal(this.ntbEmrtyTotal.Text.Trim());
     int Weighty20 = Convert.ToInt32(this.ntbWeighty20.Text.Trim());
     int Weighty40 = Convert.ToInt32(this.ntbWeighty40.Text.Trim());
     int Weighty45 = Convert.ToInt32(this.ntbWeighty45.Text.Trim());
     decimal WeightyTotal = Convert.ToDecimal(this.ntbWeightyTotal.Text.Trim());
     decimal CargoWeigth = this.rbtCargoType.SelectedIndex == 0 ? Convert.ToDecimal(this.ntbWeight.Text.Trim()) : Convert.ToDecimal(this.ntbConWeight.Text.Trim()); ;
     decimal ContainerTotal = Convert.ToDecimal(this.ntbContainerTotal.Text.Trim());
     string TradeType = this.rbtTradeType.SelectedItem.Value.Trim();
     string UpORDown = this.rbtUpORDown.SelectedItem.Value.Trim();
     string InOROut = this.rbtInOROut.SelectedItem.Value.Trim();
     string LoadCountry = this.txtLoadCountry.Text.Trim();
     string LoadHarbour = this.txtLoadHarbour.Text.Trim();
     string UnloadCountry = this.txtUnloadCountry.Text.Trim();
     string UnloadHarbour = this.txtUnloadHarbour.Text.Trim();
     string AgentGuid = this.ddlAgentCorp.SelectedItem.Value.Trim();
     string AgentCorp = this.ddlAgentCorp.SelectedItem.Text.Trim();
     string DealgoodsGuid = this.ddlDealgoodsCorp.SelectedItem.Value.Trim();
     string DealgoodsCorp = this.ddlDealgoodsCorp.SelectedItem.Text.Trim();
     string LoadCorp = this.txtLoadCorp.Text.Trim();
     string Is_Agent = ViewState["IS_AGENT"].ToString();
     //更新数据
     string Guid = Request.QueryString["Guid"].ToString();
     StartDB.Update(Guid, CompanyGuid, CompanyName, ShipGuid, ShipName, BerthGuid, BerthName, UpAddress, WorkType, DockTime, StartTimie, CargoType, CargoName, CargoPiece, CargoClassCode1, CargoClassName1, CargoClassCode2, CargoClassName2, Empty20, Empty40, Empty45, EmptyTotal, Weighty20, Weighty40, Weighty45, WeightyTotal, CargoWeigth, ContainerTotal, TradeType, UpORDown, InOROut, LoadCountry, LoadHarbour, UnloadCountry, UnloadHarbour, AgentGuid, AgentCorp, DealgoodsGuid, DealgoodsCorp, LoadCorp, Is_Agent);
     //更新数据状态
     new CawDataStatusDB().UpdateNoSubmit(Guid, Session["UserID"].ToString(), Session["RealName"].ToString());
     if (oper == 1)
     {
         //提交信息,需要判断,如果是暂停,则不需要生产新的工作流实例
         if (Convert.ToString(ViewState["CurrStatus"]) == "4")
         {
             //暂停状态,重新提交数据时,只需要更新数据状态,从"4"转换成"1"
             new CawDataStatusDB().Update(Convert.ToString(ViewState["Guid"]), "1");
         }
         else  //生成新的工作流实例
         {
             string FirstStepName = "";
             bool HasFlow = new CaseCheck().InsertCase("Caw_Start_Edit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                           Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                            Convert.ToString(Session["CompanyName"]), out FirstStepName);
             if (!HasFlow) //不存在相应的工作流
             {
                 CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
             }
             else  //将第一个步骤名称插入状态表中
             {
                 new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
             }
         }
     }
     if (CargoType == "1")
         this.CallJsFun("javascript:Is_JZX(1);");
 }
        /// <summary>
        /// 保存数据,同时更新数据状态
        /// </summary>
        protected void SaveDate(int per)
        {
            string Guid = ViewState["Guid"].ToString();
            string ShipGuid = this.hidShipGuid.Value.Trim();
            string CompanyGuid = Session["ORGID"].ToString();
            string CompanyName = Session["CompanyName"].ToString();
            string ShipNameCN = this.txtShipNameCN.Text.Trim();
            string ShipNameEN = this.txtSHIPNAMEEN.Text.Trim();
            string CallLetter = this.txtCALLLETTER.Text.Trim();
            string Owner = this.txtOWNER.Text.Trim();
            int BuildDate = Convert.ToInt16(this.ntbYearNum.Text.ToString());
            string Nationnality = this.txtNationality.Text.Trim();
            int ShipType = this.ddlShipType.SelectedIndex == 0 ? -1 : Convert.ToInt16(this.ddlShipType.SelectedItem.Value.Trim());
            string ShipTypeName = this.ddlShipType.SelectedItem.Text.Trim();
            int ShipHoist = this.ntbShipHoist.Text.Trim() == "" ? 0 : Convert.ToInt16(this.ntbShipHoist.Text.Trim());
            int ShipHold = this.ntbShipHold.Text.Trim() == "" ? 0 : Convert.ToInt16(this.ntbShipHold.Text.Trim());
            decimal TotalTon = this.ntxtTOTALTON.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtTOTALTON.Text.Trim());
            decimal NetTon = this.ntxtNETTON.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtNETTON.Text.Trim());
            decimal LoadTon = this.ntxtLOADTON.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtLOADTON.Text.Trim());
            decimal ShipLength = this.ntxtSHIPLENGTH.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtSHIPLENGTH.Text.Trim());
            decimal ShipWidth = this.ntxtSHIPWIDTH.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtSHIPWIDTH.Text.Trim());
            decimal Depth = this.ntxtDEPTH.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtDEPTH.Text.Trim());
            string GoodsInfo = this.txtGOODSINFO.Text.Trim();
            string FeeInfo = this.txtFEEINFO.Text.Trim();
            decimal Length = this.ntxtLENGTH.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtLENGTH.Text.Trim());
            decimal LollDepth = this.ntxtLOLLDEPTH.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtLOLLDEPTH.Text.Trim());
            decimal Height = this.ntxtHEIGHT.Text.Trim() == "" ? 0 : Convert.ToDecimal(this.ntxtHEIGHT.Text.Trim());
            string ShipMenNationnality = this.txtSHIPMENNATIONNALITY.Text.Trim();
            string PortGuid = this.ddlCorp.SelectedItem.Value.Trim();
            string PortName = this.ddlCorp.SelectedItem.Text.Trim();
            string BerthGuid = this.ddlBerth.SelectedItem.Value.Trim();
            string BerthName = this.ddlBerth.SelectedItem.Text.Trim();
            string LoadHarbour = this.txtLOADHARBOUR.Text.Trim();
            string UnLoadHarbour = this.txtUNLOADHARBOUR.Text.Trim();
            string PrevionsHarbour = this.txtPREVIOUSHARBOUR.Text.Trim();
            string NextHarbour = this.txtNEXTHARBOUR.Text.Trim();
            DateTime ArriveYangtseRiverDate = this.dtbARRIVEDATE.Text.Trim() == "" ? DateTime.MinValue : Convert.ToDateTime(this.dtbARRIVEDATE.Text.Trim() + " " + this.ntbArriveHour.Text.Trim() + ":" + this.ntbArriveMinute.Text.Trim());
            DateTime ArriveZJGDate = this.dtbARRIVEZJGDATE.Text.Trim() == "" ? DateTime.MinValue : Convert.ToDateTime(this.dtbARRIVEZJGDATE.Text.Trim() + " " + this.ntbZJGHour.Text.Trim() + ":" + this.ntbZJGMinute.Text.Trim());
            string DealGoodsCMPGuid = this.ddlDealGoodsCmp.SelectedIndex == 0 ? "" : this.ddlDealGoodsCmp.SelectedItem.Value.Trim();
            string DealGoodsCMPName = this.ddlDealGoodsCmp.SelectedItem.Text.Trim();

            AgentShipDB.Update(Guid, ShipGuid, CompanyGuid, CompanyName, ShipNameCN, ShipNameEN, CallLetter, Owner, BuildDate, Nationnality,
                ShipType, ShipTypeName, ShipHoist, ShipHold, TotalTon, NetTon, LoadTon, ShipLength, ShipWidth, Depth, GoodsInfo,
                FeeInfo, Length, LollDepth, Height, ShipMenNationnality, PortGuid, PortName, BerthGuid, BerthName, LoadHarbour,
                UnLoadHarbour, PrevionsHarbour, NextHarbour, ArriveYangtseRiverDate, ArriveZJGDate, DealGoodsCMPGuid, DealGoodsCMPName);
            //更新数据状态
            new CawDataStatusDB().UpdateNoSubmit(Guid, Session["UserID"].ToString(), Session["RealName"].ToString());

            if (per == 1)
            {
                //提交信息,需要判断,如果是暂停,则不需要生产新的工作流实例
                if (Convert.ToString(ViewState["CurrStatus"]) == "4")
                {
                    //暂停状态,重新提交数据时,只需要更新数据状态,从"4"转换成"1"
                    new CawDataStatusDB().Update(Convert.ToString(ViewState["Guid"]), "1");
                }
                else  //生成新的工作流实例
                {
                    string FirstStepName = "";
                    bool HasFlow = new CaseCheck().InsertCase("Caw_Info_AgentShipInfo_Edit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                                  Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                                   Convert.ToString(Session["CompanyName"]), out FirstStepName);
                    if (!HasFlow) //不存在相应的工作流
                    {
                        CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
                    }
                    else  //将第一个步骤名称插入状态表中
                    {
                        new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
                    }

                }
            }
        }
        private void SaveInfo(int oper)
        {
            string CompanyGuid = this.lblCompanyGuid.Text.Trim();
            string CompanyName = this.lblCompanyName.Text.Trim();
            string YearNum = this.ddlYear.SelectedItem.Text.Trim();
            string DivSave = this.hidHTML.Value.Trim();
            string SumUp = this.TextBox67.Text.Trim();
            //更新值
            new CawPortManageDB().Update(ViewState["Guid"].ToString(), CompanyGuid, CompanyName, YearNum, DivSave, SumUp);
            //更新数据状态
            new CawDataStatusDB().UpdateNoSubmit(ViewState["Guid"].ToString(), Session["UserID"].ToString(), Session["RealName"].ToString());
            if (oper == 1)
            {
                //提交信息,需要判断,如果是暂停,则不需要生产新的工作流实例
                if (Convert.ToString(ViewState["CurrStatus"]) == "4")
                {
                    //暂停状态,重新提交数据时,只需要更新数据状态,从"4"转换成"1"
                    new CawDataStatusDB().Update(Convert.ToString(ViewState["Guid"]), "1");
                }
                else  //生成新的工作流实例
                {
                    string FirstStepName = "";
                    bool HasFlow = new CaseCheck().InsertCase("Caw_PortManage_Edit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                                  Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                                   Convert.ToString(Session["CompanyName"]), out FirstStepName);
                    if (!HasFlow) //不存在相应的工作流
                    {
                        CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
                    }
                    else  //将第一个步骤名称插入状态表中
                    {
                        new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
                    }

                }
            }
        }
Ejemplo n.º 11
0
 private void MyCheckItems()
 {
     DataView dvList =new CaseCheck().GetMyCheckItems(Convert.ToString(Session["UserID"])).DefaultView;
     if (dvList.Count > 0)
     {
         this.DataGrid1.DataSource = dvList;
         this.DataGrid1.DataBind();
     }
     else
     {
         this.CallJsFun("document.all[\"tdCheck\"].style.display = 'none';");
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// 
        /// 编写日期:2010-3-12
        /// 编写人:GWF
        /// </summary>
        /// <param name="GUID"></param>
        /// <param name="DATASTATUS"></param>
        public int Update(string PageName,string GUID,string SubmitUserID,string SubmitUserName, string CorGuid,string CorName,string DATASTATUS,bool IsPause)
        {
            string FirstStepName = "";
            if (!IsPause)
            {
                bool flag = new CaseCheck().InsertCase(PageName, GUID, SubmitUserID, SubmitUserName, CorGuid, CorName, out FirstStepName);
                if (flag == false)
                {
                    return 0;
                }
            }
            Database db = DatabaseFactory.CreateDatabase(CawConnStr);
            string strSql = (db.DbProviderFactory.ToString() != "System.Data.OracleClient.OracleClientFactory") ?
                "UPDATE CAW_DATESTATUS SET DATASTATUS=@DATASTATUS,DATASTATUS_NAME=@DATASTATUS_NAME,SUBMITUSERNAME=@SUBMITUSERNAME,SUBMITUSERID=@SUBMITUSERID,SUBMITDATE=@SUBMITDATE WHERE  KEYGUID=@GUID " :
                "UPDATE CAW_DATESTATUS SET DATASTATUS=:DATASTATUS,DATASTATUS_NAME=:DATASTATUS_NAME,SUBMITUSERNAME=:SUBMITUSERNAME,SUBMITUSERID=:SUBMITUSERID,SUBMITDATE=:SUBMITDATE WHERE  KEYGUID=:GUID ";
            DbCommand cmd = db.GetSqlStringCommand(strSql);
            db.AddInParameter(cmd, "DATASTATUS", DbType.String, DATASTATUS);
            db.AddInParameter(cmd, "DATASTATUS_NAME", DbType.String, FirstStepName);
            db.AddInParameter(cmd, "SUBMITUSERNAME", DbType.String, SubmitUserName);
            db.AddInParameter(cmd, "SUBMITUSERID", DbType.String, SubmitUserID);
            db.AddInParameter(cmd, "SUBMITDATE", DbType.DateTime, DateTime.Now);

            db.AddInParameter(cmd, "GUID", DbType.String, GUID);
               strSql = GetSqlStr(strSql, cmd);
               new FrameLog().InsertLog(OPERATION_TYPE.LOG_MODIFY, "审批状态", "更新审批状态,编码为" + strSql, "CAW_DATESTATUS");
            return db.ExecuteNonQuery(cmd);
        }
Ejemplo n.º 13
0
        public DataView GetWaiteItems(string UserID)
        {
            CaseCheck CC = new CaseCheck();
            List<OA_SWFCASE> SCList = CC.GetMyCheck(UserID);
            DataTable tab = new DataTable();
            tab.Columns.Add("SEQ", typeof(System.Int32));
            tab.Columns.Add("TITLE", typeof(System.String));
            tab.Columns.Add("SUBMITORGNAME", typeof(System.String));
            tab.Columns.Add("SUBMITDATE", typeof(System.String));
            tab.Columns.Add("URL", typeof(System.String));
            tab.Columns.Add("SUBMITORGID", typeof(System.String));

            for (int i = 0; i < SCList.Count; i++)
            {
                DataRow dr = tab.NewRow();
                dr[0] = Convert.ToString(i + 1);
                dr[1] = SCList[i].CASETITLE;
                dr[2] = SCList[i].SUBMITORGNAME;
                dr[3] = SCList[i].SUBMITDATE.ToString();
                dr[4] = "/Projects/ZJGEportDocManage/Approval/CheckForm.aspx?Guid=" + SCList[i].FORMKEY;
                dr[5] = SCList[i].SUBMITORGID;
                tab.Rows.Add(dr);
            }
            return tab.DefaultView;
        }
        private void SaveInfo(int oper)
        {
            string DivSave = hidHTML.Value;//str即为所需值。

            string CompanyGuid = this.lblCompanyGuid.Text.Trim();
            string CompanyName = this.txtPortOperator.Text.Trim();
            string YearNum = this.ddlYear.SelectedItem.Text.Trim();
            string SunUp = this.TextBox67.Text.Trim();
               // string DivSave = spanSave.InnerHtml.Replace("'", "★");
            //插入值
            new CawPortManageDB().Insert(ViewState["Guid"].ToString(), CompanyGuid, CompanyName, YearNum, DivSave, SunUp);
            //插入状态
            new CawDataStatusDB().Insert(ViewState["Guid"].ToString(), DateTime.Now, Session["RealName"].ToString(), Session["UserID"].ToString(), "0");
            if (oper == 1)
            {
                //生成新的工作流实例
                string FirstStepName = "";
                bool HasFlow = new CaseCheck().InsertCase("Caw_PortManage_Edit.aspx", Convert.ToString(ViewState["Guid"]), Convert.ToString(Session["UserID"]),
                                                              Convert.ToString(Session["RealName"]), Convert.ToString(Session["ORGID"]),
                                                               Convert.ToString(Session["CompanyName"]), out FirstStepName);
                if (!HasFlow) //不存在相应的工作流
                {
                    CallJsFun("alert('数据保存成功.但不存在相应的审批配置,请联系管理员或稍候重新提交.');window.close();");
                }
                else  //将第一个步骤名称插入状态表中
                {
                    new CawDataStatusDB().UpdateStepName(Convert.ToString(ViewState["Guid"]), "1", FirstStepName);
                }
            }
        }