Exemplo n.º 1
0
    private void Job_New_Save(DevExpress.Web.ASPxGridView.ASPxGridViewCustomDataCallbackEventArgs e)
    {
        DateTime date  = DateTime.Now;
        string   time4 = date.ToString("HHmm");

        string jobType   = SafeValue.SafeString(cbb_new_jobtype.Value, "IMP");
        string jobStatus = "Booked";

        string jobType1 = jobType;

        string jobno       = "";
        string user        = HttpContext.Current.User.Identity.Name;
        string quoteNo     = "";
        string billingType = "None";

        if (jobType1 == "TPT")
        {
            billingType = "Job";
        }
        else
        {
            jobno   = C2Setup.GetNextNo("", "CTM_Job_" + jobType1, date);
            quoteNo = jobno;
        }
        string wh     = System.Configuration.ConfigurationManager.AppSettings["Warehosue"];
        string sql    = string.Format(@"insert into CTM_Job (JobNo,JobDate,EtaDate,EtdDate,CodDate,StatusCode,CreateBy,CreateDatetime,UpdateBy,UpdateDatetime,EtaTime,EtdTime,JobType,ClientId,YardRef,PickupFrom,DeliveryTo,Remark,WarehouseAddress,JobStatus,QuoteNo,QuoteStatus,QuoteDate,WareHouseCode,BillingType,IsTrucking,IsWarehouse) values ('{0}','{4}',getdate(),getdate(),getdate(),'USE','{1}',getdate(),'{1}',getdate(),'{2}','{2}','{3}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','Pending',getdate(),'{13}','{14}','Yes','No') select @@identity", jobno, user, time4, cbb_new_jobtype.Value, txt_new_JobDate.Date, btn_ClientId.Text, "", txt_FromAddress.Text, txt_ToAddress.Text, txt_new_remark.Text, "", jobStatus, quoteNo, wh, billingType);
        int    jobId  = SafeValue.SafeInt(ConnectSql_mb.ExecuteScalar(sql), 0);
        string remark = "";

        if (jobId > 0)
        {
            string            userId = HttpContext.Current.User.Identity.Name;
            C2.CtmJobEventLog elog   = new C2.CtmJobEventLog();
            elog.Platform_isWeb();
            elog.Controller = userId;
            remark          = CtmJobEventLogRemark.getDes("106");
            elog.ActionLevel_isJOB(jobId);
            C2Setup.SetNextNo("", "CTM_Job_" + jobType1, jobno, date);
            elog.Remark = remark;
            elog.log();

            e.Result = jobno;
        }
    }
Exemplo n.º 2
0
 private void setRemark(string code, string plus)
 {
     this.Remark  = CtmJobEventLogRemark.getDes(code);
     this.Remark += plus;
 }
Exemplo n.º 3
0
 private void setRemark(string code)
 {
     this.Remark = CtmJobEventLogRemark.getDes(code);
 }
Exemplo n.º 4
0
 private void setRemark(int l, int c, string plus)
 {
     this.Remark  = CtmJobEventLogRemark.getDes(l, c);
     this.Remark += plus;
 }
Exemplo n.º 5
0
 public void setRemark(CtmJobEventLogRemark.Level l, int c, string plus)
 {
     this.Remark  = CtmJobEventLogRemark.getDes(l, c);
     this.Remark += plus;
 }
Exemplo n.º 6
0
 public void setRemark(CtmJobEventLogRemark.Level l, int c)
 {
     this.Remark = CtmJobEventLogRemark.getDes(l, c);
 }
Exemplo n.º 7
0
 private void setRemark(CtmJobEventLogRemark.Level l, CtmJobEventLogRemark.Command c, string plus)
 {
     this.Remark  = CtmJobEventLogRemark.getDes(l, c);
     this.Remark += plus;
 }
Exemplo n.º 8
0
 private void setRemark(CtmJobEventLogRemark.Level l, CtmJobEventLogRemark.Command c)
 {
     this.Remark = CtmJobEventLogRemark.getDes(l, c);
 }