コード例 #1
0
 public void GetData(int rowindex, int id, string value)
 {
     if (value.Trim().Length > 0)
     {
         DataFactory dal = new DataFactory();
         DataSet     ds  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_ComplexCost_SP", new List <IFields>()
         {
             dal.CreateIFields()
             .Append("Option", "GetData")
             .Append("type", id.ToString())
             .Append("str", value.Trim().Replace(" ", ""))
             .Append("stat", FSecurityHelper.CurrentUserDataGET()[12])
         }).GetList();
         //StoreGetData.DataSource = ds;
         //StoreGetData.DataBind();
         if (ds != null && ds.Tables[0].Rows.Count > 0)
         {
             this.storeList.UpdateRecordField(rowindex, "cxd_LotNo", ds.Tables[0].Rows[0]["LotNo"].ToString());
             this.storeList.UpdateRecordField(rowindex, "cxd_Master", ds.Tables[0].Rows[0]["Master"].ToString());
             this.storeList.UpdateRecordField(rowindex, "cxd_House", ds.Tables[0].Rows[0]["House"].ToString());
             this.storeList.UpdateRecordField(rowindex, "cxd_LotSeed", ds.Tables[0].Rows[0]["Seed"].ToString());
             this.storeList.UpdateRecordField(rowindex, "cxd_Sys", ds.Tables[0].Rows[0]["SYS"].ToString());
             this.storeList.UpdateRecordField(rowindex, "GWT", ds.Tables[0].Rows[0]["GWT"].ToString());
             this.storeList.UpdateRecordField(rowindex, "VWT", ds.Tables[0].Rows[0]["VWT"].ToString());
             this.storeList.UpdateRecordField(rowindex, "Piece", ds.Tables[0].Rows[0]["Piece"].ToString());
         }
     }
 }
コード例 #2
0
    public string stationSys; //当前用户所在系统(总站Y或者分站N)

    protected void Page_PreRender(object sender, EventArgs e)
    {
        if (!X.IsAjaxRequest)
        {
            if (!IsPostBack)
            {
                userDept   = FSecurityHelper.CurrentUserDataGET()[28].ToUpper();
                stationSys = FSecurityHelper.CurrentUserDataGET()[29].ToUpper();

                if (userDept == "OP" || userDept == "ACCOUNT" || stationSys == "N")
                {
                    DisabledControl();
                }
                else
                {
                    UseControl();
                }

                this.BindData();

                //if (ControlBinder.GetPermissionID("sales") == "P000")
                //{
                //Next.Disabled = true;
                //Save.Disabled = true;
                //Cancel.Disabled = true;
                //}
            }
        }
    }
コード例 #3
0
    void DataBinder()
    {
        try
        {
            DataFactory dal = new DataFactory();
            DataSet     ds  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Ocean_OIJobList_SP", new List <IFields>()
            {
                dal.CreateIFields()
                .Append("Option", "OIJobList")
                .Append("LotNo", txtLotNo.Text.Trim())
                .Append("MBL", txtMBL.Text.Trim())
                .Append("POL", txtPOL.Text.Trim())
                //.Append("POD", txtPOD.Text.Trim())
                .Append("Vessel", txtVessel.Text.Trim())
                .Append("From", ControlBinder.getDate(string.IsNullOrEmpty(txtFrom.RawText)?"1900/01/01":(object)txtFrom.RawText))
                .Append("To", ControlBinder.getDate(string.IsNullOrEmpty(txtTo.RawText)?DateTime.Now.AddYears(1).ToString("yyyy/MM/dd"):(object)txtTo.RawText))
                .Append("STAT", FSecurityHelper.CurrentUserDataGET()[12].ToString())
                .Append("SYS", "OI")
                .Append("UserGrade", FSecurityHelper.CurrentUserDataGET()[27].ToString())
                .Append("o_Shipper", txtShipper.Text.Trim())//2014-12-18 Grace (修改查询条件)
                .Append("o_Active", chbVoid.Checked?"1":"0")
            }).GetList();
            storeList.DataSource = ds;
            storeList.DataBind();

            if (FSecurityHelper.CurrentUserDataGET()[27].ToString().ToUpper() == "MANAGER")
            {
                gridList.ColumnModel.SetHidden(13, false);
                gridList.ColumnModel.SetColumnWidth(7, 68);
            }
        }
        catch
        {
        }
    }
コード例 #4
0
    private void ComboBoxBinding()
    {
        DataSet dsSalesman      = GetComboxDs("SalesList");
        DataSet dsLocation      = GetComboxDs("LocationList");
        DataSet dsUnit          = GetComboxDs("UnitBinding");
        DataSet dsItem          = GetComboxDs("ItemBinding");
        DataSet dsKind          = GetComboxDs("QtyKindBinding");
        DataSet dsCurrencysList = GetComboxDs("CurrencysInvoice");
        DataSet dsGetItem       = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_GetItem_SP", new List <IFields> {
            dal.CreateIFields()
            .Append("Option", "GetItem").Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("SYS", "A")
        }).GetList();

        StoreGetItem.DataSource = dsGetItem;
        StoreGetItem.DataBind();

        StoreCurrInvoice.DataSource = dsCurrencysList;
        StoreCurrInvoice.DataBind();

        StoreLocation.DataSource = dsLocation;
        StoreLocation.DataBind();

        StoreUnit.DataSource = dsUnit;
        StoreUnit.DataBind();

        StoreKind.DataSource = dsKind;
        StoreKind.DataBind();

        StoreSalesman.DataSource = dsSalesman;
        StoreSalesman.DataBind();

        ControlBinder.CmbBinder(StoreAgentLocal, "PPCC", "A");
    }
コード例 #5
0
    protected void btnClick_Click(object sender, EventArgs e)
    {
        UserGridPanel1.FieldName = FieldName;
        var            ShipmentItem = Ext.Net.JSON.Deserialize <List <ShipmentItem> >(UserGridPanel1.getJSON).Where(p => !string.IsNullOrEmpty(p.CompanyCode)).ToList();
        List <IFields> listCosting  = new List <IFields>();

        for (int i = 0; i < ShipmentItem.Count; ++i)
        {
            listCosting.Add(dal.CreateIFields().Append("Option", "Update_M").
                            Append("si_BillTo", ShipmentItem[i].CompanyCode).
                            Append("si_Item", ShipmentItem[i].Item).
                            Append("si_Description", ShipmentItem[i].Description.ToUpper()).
                            Append("si_QtyKind", ShipmentItem[i].CalcKind).
                            Append("si_Quantity", string.IsNullOrEmpty(ShipmentItem[i].Qty) ? (object)DBNull.Value : ShipmentItem[i].Qty).
                            Append("si_Unit", ShipmentItem[i].Unit).
                            Append("si_Currency", ShipmentItem[i].Currency).
                            Append("si_Rate", string.IsNullOrEmpty(ShipmentItem[i].Rate) ? (object)DBNull.Value : ShipmentItem[i].Rate).
                            Append("si_Amount", string.IsNullOrEmpty(ShipmentItem[i].Amount) ? (object)DBNull.Value : ShipmentItem[i].Amount).
                            Append("si_ExRate", string.IsNullOrEmpty(ShipmentItem[i].EX) ? (object)DBNull.Value : ShipmentItem[i].EX).
                            Append("si_Type", i).
                            Append("si_Total", string.IsNullOrEmpty(ShipmentItem[i].Total) ? (object)DBNull.Value : ShipmentItem[i].Total).
                            Append("si_Stat", FSecurityHelper.CurrentUserDataGET()[12].ToString()).
                            Append("si_Sys", "AI").
                            Append("si_ToMaster", 2088102).
                            Append("User", FSecurityHelper.CurrentUserDataGET()[0].ToString()).
                            Append("si_ROWID", ShipmentItem[i].RowID)
                            );
        }

        bool l = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirImport_ShipmentItem_SP", listCosting).Update();

        Creatgrid(CreateDataSet().Tables[0]);
    }
コード例 #6
0
    public void btnCancel_click()
    {
        if (string.IsNullOrEmpty(txtRowID.Text))
        {
            X.Msg.Alert("status", " Please choose to delete lines", new JFunction()
            {
                Fn = "textResult"
            }).Show();
            return;
        }

        bool b = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_PRINTER_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "delete")
            .Append("prt_ROWID", txtRowID.Text)
            .Append("prt_Modifier", FSecurityHelper.CurrentUserDataGET()[0])
        }).Update();

        BindGrid();
        txtRowID.Text   = "";
        Textfield2.Text = "";
        Textfield3.Text = "";
        RowSelectionModel row = this.GridPanel1.GetSelectionModel() as RowSelectionModel;

        row.SelectFirstRow();
    }
コード例 #7
0
    public static string ValidHBL(string oldname, string name, string id)
    {
        string flag = "N";

        try
        {
            DataFactory dal = new DataFactory();
            DataSet     ds  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_HBL_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "ValidHBLNo")
                .Append("o_STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("OldHBL", oldname).Append("o_HBL", name).Append("Seed", id)
            }).GetList();
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                flag = ds.Tables[0].Rows[0][0].ToString();
            }
        }
        catch
        {
            flag = "Y";
        }


        return(flag);
    }
コード例 #8
0
 protected void btnChangePass_Click(object sender, DirectEventArgs e)
 {
     if (string.IsNullOrEmpty(txtChangePass.Text.Trim()))
     {
         X.Msg.Show(new MessageBoxConfig {
             Title = "Warning", Message = "Password can't be empty", Icon = MessageBox.Icon.WARNING, Buttons = MessageBox.Button.OK
         });
     }
     else
     {
         bool flag = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_USER_SP", new List <IFields>()
         {
             dal.CreateIFields()
             .Append("Option", "ChangePwd")
             .Append("UserPWD", GetMD5(txtChangePass.Text.Trim()))
             .Append("Modifier", FSecurityHelper.CurrentUserDataGET()[0])
             .Append("RowID", hidID.Text)
         }).Update();
         if (!flag)
         {
             X.Msg.Show(new MessageBoxConfig {
                 Title = "Error", Message = "Change password failed", Icon = MessageBox.Icon.ERROR, Buttons = MessageBox.Button.OK
             });
         }
         else
         {
             txtChangePass.Clear();
             txtChangePassAgain.Clear();
             winPassChange.Hide();
         }
     }
 }
コード例 #9
0
    public void UserStat(string username, string companyid)
    {
        hidName.Text = username;
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_USER_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "UserStat")
            .Append("UserName", username)
            .Append("CompanyID", companyid)
            .Append("Creator", FSecurityHelper.CurrentUserDataGET()[0])
        }).GetList();

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            Ext.Net.CheckboxGroup chkGroup = new CheckboxGroup();
            chkGroup.ID            = "chkGroup";
            chkGroup.ColumnsNumber = 3;
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                Ext.Net.Checkbox chk = new Checkbox();
                chk.ID       = "chkGroup" + i.ToString();
                chk.BoxLabel = ds.Tables[0].Rows[i]["Stat"].ToString();
                chk.Name     = ds.Tables[0].Rows[i]["STATION"].ToString();
                chk.Checked  = ds.Tables[0].Rows[i]["IsActive"].ToString() == "N" ? false : true;
                if (ds.Tables[0].Rows[i]["STATION"].ToString() == companyid)
                {
                    chk.Disabled = true;
                }
                chkGroup.Items.Add(chk);
            }
            chkGroup.AddTo(panChk);
        }
        winUserStat.Show();
    }
コード例 #10
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        if (!X.IsAjaxRequest)
        {
            if (!IsPostBack)
            {
                ControlsInitial();
                userDept   = FSecurityHelper.CurrentUserDataGET()[28].ToUpper();
                stationSys = FSecurityHelper.CurrentUserDataGET()[29].ToUpper();
                isServer   = FSecurityHelper.CurrentUserDataGET()[30].ToUpper();

                if ((userDept == "OP" || userDept == "ACCOUNT" || stationSys == "N") && isServer == "Y")
                {
                    DisabledControl();
                }
                else
                {
                    UseControl();
                }

                ControlBinding();
                DataBinder();
                div_bottom.Html = "<p>Status: New Item record .</p>";
            }
        }
    }
コード例 #11
0
    public void btnCancel_click()
    {
        if (string.IsNullOrEmpty(txtRowID.Text))
        {
            X.Msg.Alert("status", " Please choose to delete lines").Show();
            return;
        }
        bool b = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_USER_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "DeleteUser")
            .Append("RowID", txtRowID.Text)
            .Append("Modifier", FSecurityHelper.CurrentUserDataGET()[0])
        }).Update();

        if (b)
        {
            GridBind("");
            RowSelectionModel row = this.gridpanel.GetSelectionModel() as RowSelectionModel;
            row.SelectFirstRow();
        }
        else
        {
            X.Msg.Alert("status", " Delete failed ").Show();
        }
    }
コード例 #12
0
    /// <summary>
    /// 绑定CheckBoxGroup绑定(来源表FW_COMPANY) (2014-09-24)
    /// </summary>
    /// <param name="chk">数据源控件</param>
    public static void ChkGroupBind(CheckboxGroup chk)
    {
        DataTable dsCheckBoxGroup = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_FW_COMPANY_BindCheck_SP").GetTable();

        if (dsCheckBoxGroup != null && dsCheckBoxGroup.Rows.Count > 0)
        {
            foreach (DataRow dr in dsCheckBoxGroup.Rows)
            {
                chk.Items.Add(new Checkbox()
                {
                    Value = dr[1].ToString(), Tag = dr[1].ToString().Trim(), BoxLabel = dr[0].ToString(), LabelAlign = LabelAlign.Right, LabelWidth = 45, Checked = true
                });
            }
        }
        else
        {
            chk.Items.Add(new Checkbox());
            chk.Hide();

            //chk.Dispose();
            //chk.Destroy();
        }

        string dept = FSecurityHelper.CurrentUserDataGET()[28].ToUpper();

        if (dept == "OP" || dept == "ACCOUNT")
        {
            chk.Hide();
        }
    }
コード例 #13
0
    /// <summary>
    /// 更新新的lotNo
    /// </summary>
    /// <param name="code">sys 如果是invoice 还要加上DN或CN</param>
    /// <param name="seed">SeedID</param>
    /// <param name="date">ETD时间,根据这个时间来决定是否</param>
    /// <returns></returns>
    public static string GetNewLotNo(string code, string seed, object date)
    {
        string lotNo = "-1";
        string l     = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_SysUpdateLotNo_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "CheckIsAC")
            .Append("seed", seed).Append("code", code)
        }).GetTable().Rows[0][0].ToString();

        if (l == "0")//表示没有COST过账 即:ISAC=1的记录为0条
        {
            string code1 = (FSecurityHelper.CurrentUserDataGET()[12].Length > 3) ? FSecurityHelper.CurrentUserDataGET()[12].Substring(4, 3) : FSecurityHelper.CurrentUserDataGET()[12];
            lotNo = dal.FactoryDAL(PageHelper.ConnectionStrings, "[FW_SysUpdateLotNo_SP]", new List <IFields>()
            {
                dal.CreateIFields()

                .Append("code", code1 + code)//FSecurityHelper.CurrentUserDataGET()[4].ToString()+code
                .Append("seed", seed)
                .Append("stat", FSecurityHelper.CurrentUserDataGET()[12].ToString())
                .Append("user", FSecurityHelper.CurrentUserDataGET()[0].ToString())
                .Append("date", date)
            }).GetTable().Rows[0][0].ToString();
        }
        return(lotNo);
    }
コード例 #14
0
    public static void CmbBinder(Store store, string Type, bool flag)
    {
        DataSet ds = new DataSet();

        if (flag == true)
        {
            ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().
                Append("Option", Type).
                Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]).
                Append("SYS", "A")
            }).GetList();
        }
        else
        {
            if (HttpContext.Current.Cache[Type] == null)
            {
                ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
                {
                    dal.CreateIFields().
                    Append("Option", Type).
                    Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]).
                    Append("SYS", "A")
                }).GetList();
                HttpContext.Current.Cache.Insert(Type, ds);
            }
        }

        store.DataSource = ds;
        store.DataBind();
    }
コード例 #15
0
    void DataBinder(string id)
    {
        if (id.Length > 0)
        {
            //Window2.Show();
            DataFactory dal = new DataFactory();
            DataSet     ds  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_CallShipment_SP", new List <IFields>()
            {
                dal.CreateIFields()
                .Append("Option", "GetList").Append("id", id).Append("sys", FSecurityHelper.CurrentUserDataGET()[11])
                .Append("stat", FSecurityHelper.CurrentUserDataGET()[12])
            }).GetList();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                //lblShow.Text = "Lot No# " + ds.Tables[0].Rows[0]["ai_lotno"].ToString() + "   MAWB# " + ds.Tables[0].Rows[0]["ai_mawb"].ToString();
                //GridPanelList.GetStore().DataSource = ds.Tables[0];
                //GridPanelList.GetStore().DataBind();
            }
        }
        else
        {
            //Window2.Hide();
        }
    }
コード例 #16
0
    private string[] GetNums(string flag)
    {
        string[] nums = null;

        nums     = new string[18];
        nums[0]  = Server.MapPath("~/Report/CommonReportFile/" + "JobReference" + ".rpt");
        nums[1]  = flag;
        nums[2]  = CmbPrint.SelectedItem.Value;
        nums[3]  = consignee;
        nums[4]  = from;
        nums[5]  = to;
        nums[6]  = dest;
        nums[7]  = shipper;
        nums[8]  = FSecurityHelper.CurrentUserDataGET()[12];
        nums[9]  = sys;
        nums[10] = coloader;
        nums[11] = Container;
        nums[12] = HBL;
        nums[13] = JobNo;
        nums[14] = MBL;
        nums[15] = sales;
        nums[16] = Vessel;
        nums[17] = Voyage;

        return(nums);
    }
コード例 #17
0
    public void btnRevert_Click()
    {
        string lotno = hidLotNo.Text;

        if (lotno != "")
        {
            DataSet result = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirExport_DirectMAWB_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "Revert").Append("air_Seed", hidSeed.Text)
                .Append("User", FSecurityHelper.CurrentUserDataGET()[0].ToString())
            }).GetList();
            if (result != null && result.Tables[0].Rows.Count > 0)
            {
                string type = "";
                if (result.Tables[0].Rows[0][0].ToString() == "s")
                {
                    Response.Redirect("../AEShipAndColIn/List.aspx?type=s&seed=" + result.Tables[0].Rows[0][1]);
                }
                else
                {
                    Response.Redirect("../AEShipAndColIn/List.aspx?type=c&seed=" + result.Tables[0].Rows[0][1]);
                }
            }
            else
            {
                ControlBinder.pageTitleMsg(false, showname + hidLotNo.Text, "<p class=\"error\">Status :  Deleted failed, please check the data . </p>", div_bottom);
            }
        }
    }
コード例 #18
0
    private void LoadValue()
    {
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_Print_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "PrintList")
            .Append("prt_STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("prt_ReportCode", Request.QueryString["type"]).Append("prt_sys", "OE")
        }).GetList();

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            Store2.DataSource = ds.Tables[0];
            Store2.DataBind();
        }
        if (ds != null && ds.Tables[1].Rows.Count > 0)
        {
            CmbPrint.SelectedItem.Value = ds.Tables[1].Rows[0][0].ToString();
        }
        if (ds != null && ds.Tables[3].Rows.Count > 0)
        {
            storeCopies.DataSource = ds.Tables[3];
            storeCopies.DataBind();
        }
        DataTable dsType = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "TypeList")
        }).GetTable();

        if (ds != null && dsType.Rows.Count > 0)
        {
            storeType.DataSource = dsType;
            storeType.DataBind();
        }
    }
コード例 #19
0
 protected void LinBtnPrint_Click(object sender, EventArgs e)
 {
     GetPrintMargin();
     if (hidtype.Text.ToUpper() == "INVOICE")
     {
         //Invoice预览是否强制显示抬头
         hidInvDraft.Text = "0";
         DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirImport_Invoice_SP", new List <IFields>()
         {
             dal.CreateIFields().
             Append("Option", "CheckInvoiceNo").
             Append("inv_seed", hidID.Text)
             .Append("inv_IsPrinted", "1")
         }).GetList();
         if (ds.Tables[0].Rows[0][0].ToString() == "Y")
         {
             ReportHelper.SetReportDoc(Convert.ToDouble(hidtop.Text), Convert.ToDouble(hidbottom.Text), Convert.ToDouble(hidleft.Text), Convert.ToDouble(hidright.Text), int.Parse(cmbPrintCount.SelectedItem.Value), GetNums("Y"));
             Session["Tishi"] = hidID.Text;
             lbltishi.Text    = "Printed on  " + DateTime.Now.ToString("dd/MM/yyyy HH:mm").Replace("-", "/");
             ControlBinder.PrintLog(FSecurityHelper.CurrentUserDataGET()[0], FSecurityHelper.CurrentUserDataGET()[12], hidsys.Text, hidtype.Text + "(ID:" + hidID.Text + ")", CmbPrint.SelectedItem.Value);
         }
         else
         {
             X.Msg.Confirm("Print confirm", "Are you sure to print?", "if (buttonId == 'yes') { CompanyX.PrintConfirm(); }").Show();
         }
     }
     else
     {
         ReportHelper.SetReportDoc(Convert.ToDouble(hidtop.Text), Convert.ToDouble(hidbottom.Text), Convert.ToDouble(hidleft.Text), Convert.ToDouble(hidright.Text), int.Parse(cmbPrintCount.SelectedItem.Value), GetNums("Y"));
         Session["Tishi"] = hidID.Text;
         lbltishi.Text    = "Printed on  " + DateTime.Now.ToString("dd/MM/yyyy HH:mm").Replace("-", "/");
         ControlBinder.PrintLog(FSecurityHelper.CurrentUserDataGET()[0], FSecurityHelper.CurrentUserDataGET()[12], hidsys.Text, hidtype.Text + "(ID:" + hidID.Text + ")", CmbPrint.SelectedItem.Value);
     }
 }
コード例 #20
0
    /// <summary>
    /// 控件绑定
    /// </summary>
    #region   ///ComboBox 控件绑定     Author:Micro   (2011-09-27)
    void ControlsBinder()
    {
        hidSeed.Text = string.IsNullOrEmpty(Request["seed"]) ? "0" : Request["seed"];
        txtMBL.Focus(true);
        //ControlBinder.CmbBinder(StoreCmb, "CompanyList",SYS[0].ToString());
        //ControlBinder.CmbBinder(StoreItem, "ItemBinding", SYS[0].ToString());
        DataSet dsGetItem = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_GetItem_SP", new List <IFields> {
            dal.CreateIFields()
            .Append("Option", "GetItem").Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("SYS", "O")
        }).GetList();

        StoreGetItem.DataSource = dsGetItem;
        StoreGetItem.DataBind();

        //ControlBinder.CmbBinder(StoreCurrency, "CurrencysList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreUnit, "UnitBinding", SYS[0].ToString());

        ControlBinder.CmbBinder(StoreKind, "QtyKindBinding", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreSalesman, "SalesList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreVessel, "VesselList");
        ControlBinder.CmbBinder(StorePPCC, "PPCCList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreAgentLocal, "PPCC", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreLocation, "LocationList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreServiceMode, "ServerMode", SYS[0].ToString());
        //ControlBinder.CmbBinder(StoreCurrLocal, "CurrencysListLocal", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreCurrInvoice, "CurrencysInvoice", SYS[0].ToString());
        cmbVesselText.Template.Html = TempVoyage.Html;
    }
コード例 #21
0
    /// <summary>
    /// Grid 数据绑定
    /// </summary>
    #region   DataBinder()   Author: Micro ( 2011-08-26 )
    void DataBinder()
    {
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_DomesticKid_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "List")
            .Append("dept", userDept)
            .Append("dk_STAT", FSecurityHelper.CurrentUserDataGET()[12])
        }).GetList();                                                             //修改grace 2014-09-23 用于决定是否分站

        if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
        {
            //if (!string.IsNullOrEmpty(Request["txtCode"]))
            //{

            //}

            if (txtCode.Text != "")
            {
                div_bottom.Html  = "<p class=''>Status : Edit the record  of <span>" + txtCode.Text + "</span>.</p>";
                txtCode.Disabled = true;
            }

            StoreDomestic.DataSource = ds;
            StoreDomestic.DataBind();
        }
        else
        {
            div_bottom.Html = "<p class=''>Status: New Container Size record .</p>";
        }
    }
コード例 #22
0
    //更新用户信息
    public void btnUserOK_Click(object sender, DirectEventArgs e)
    {
        //更新的当前站的数据库的USER表
        bool b = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_UserManager_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("username", FSecurityHelper.CurrentUserDataGET()[0].ToString())
            .Append("email", txtUserEmail.Text)
            .Append("option", "update")
            .Append("NameCHS", txtUserName.Text.ToUpper())
            .Append("NameENG", txtUserNameen.Text.ToUpper())
            .Append("tel", txtUserTel.Text.ToUpper())
            .Append("ext", txtUserExt.Text.ToUpper())
            .Append("fax", txtUserFax.Text.ToUpper())
        }).Update();

        if (b)
        {
            //用线程更新的香港数据库的USER表
            //  UpdateUserInfo.Start();
            UpdateUserInfo.CreateFile(txtUserEmail.Text, txtUserTel.Text.ToUpper(), txtUserFax.Text.ToUpper(), txtUserExt.Text.ToUpper(), txtUserName.Text.ToUpper(), txtUserNameen.Text.ToUpper());

            ReloadDate();
            X.AddScript("location.reload();");
        }
    }
コード例 #23
0
    public void UpdateHawb(int id, string hawb)
    {
        if (hawb.Trim().Length > 0)
        {
            string  flag = "N";
            DataSet ds   = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirExport_Valid_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("type", "HAWB")
                .Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("name", hawb.Trim()).Append("id", id)
            }).GetList();
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                flag = ds.Tables[0].Rows[0][0].ToString();
            }

            if (flag == "Y")
            {
                X.Msg.Alert("Error", "HAWB NO. already exists .").Show();
                DataBinder();
            }
            else
            {
                bool result = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirExport_ConsolManagement_SP", new List <IFields> {
                    dal.CreateIFields().Append("Option", "UpdateHawbByID")
                    .Append("air_HAWB", hawb.Trim().ToUpper()).Append("air_ROWID", id.ToString())
                }).Update();
                DataBinder();
            }
        }
    }
コード例 #24
0
    /// <summary>
    /// 控件绑定
    /// </summary>
    #region   ///ComboBox 控件绑定     Author:Micro   (2011-09-27)
    void ControlsBinder()
    {
        hidSeed.Text   = Request["seed"] == null ? "" : Request["seed"];
        hidIDList.Text = Server.UrlDecode(Request["IDList"] == null ? "" : Request["IDList"]);
        //txtMBL.Focus(true);
        CmbGroup.Focus(true);
        DataSet dsGetItem = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_GetItem_SP", new List <IFields> {
            dal.CreateIFields()
            .Append("Option", "GetItem").Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("SYS", "O")
        }).GetList();

        StoreGetItem.DataSource = dsGetItem;
        StoreGetItem.DataBind();

        ControlBinder.CmbBinder(StoreUnit, "UnitBinding", SYS[0].ToString());

        ControlBinder.CmbBinder(StoreKind, "QtyKindBinding", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreSalesman, "SalesList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreVessel, "VesselList");
        ControlBinder.CmbBinder(StorePPCC, "PPCCList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreAgentLocal, "PPCC", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreLocation, "LocationList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreMode, "ServerMode", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreGroup, "GetSmGroup", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreCurrInvoice, "CurrencysInvoice", SYS[0].ToString());

        cmbVesselText.Template.Html = TempVoyage.Html;
        cmbpreVoyage.Template.Html  = TempVoyage.Html;
    }
コード例 #25
0
 void DataBinder()
 {
     try
     {
         DataFactory dal = new DataFactory();
         DataSet     ds  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Other_ShipmentList_SP", new List <IFields>()
         {
             dal.CreateIFields()
             .Append("Option", "GetList")
             .Append("tri_MBL", txtMBL.Text.Trim())
             //.Append("tri_HBL", txtHBL.Text.Trim())
             .Append("tri_LotNo", txtLotNo.Text.Trim())
             .Append("tri_Shipper", txtShipper.Text.Trim())
             //.Append("tri_Consignee", txtCNEE.Text.Trim())
             .Append("tri_STAT", FSecurityHelper.CurrentUserDataGET()[12].ToString())
             .Append("From", ControlBinder.getDate(string.IsNullOrEmpty(txtFrom.RawText)?"1900/01/01":(object)txtFrom.RawText))
             .Append("To", ControlBinder.getDate(string.IsNullOrEmpty(txtTo.RawText)?DateTime.Now.AddYears(1).ToString("yyyy/MM/dd"):(object)txtTo.RawText))
             .Append("UserGrade", FSecurityHelper.CurrentUserDataGET()[27].ToString())
             .Append("tri_Active", chbVoid.Checked?"1":"0")//2014-12-16 Grace (修改查询条件)
             .Append("tri_LocFinal", txtDest.Text.Trim())
         }).GetList();
         storeList.DataSource = ds;
         storeList.DataBind();
         if (FSecurityHelper.CurrentUserDataGET()[27].ToString().ToUpper() == "MANAGER")
         {
             gridList.ColumnModel.SetHidden(12, false);
             gridList.ColumnModel.SetColumnWidth(4, 73);
             gridList.ColumnModel.SetColumnWidth(5, 73);
         }
     }
     catch
     {
     }
 }
コード例 #26
0
    public void BindVoyag(string id)
    {
        if (id != "")
        {
            StoreVoyage.RemoveAll();

            DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "VoyageList").
                Append("sys", FSecurityHelper.CurrentUserDataGET()[12]).
                Append("STAT", cmbVesselCode.Text)
            }).GetTable();
            StoreVoyage.DataSource = dt1;
            StoreVoyage.DataBind();

            DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "VoyageByID").
                Append("STAT", id)
            }).GetTable();

            cmbVesselText.SelectedItem.Value = id;
            txtETD.Text          = dt.Rows[0][2].ToString();
            txtETADischarge.Text = dt.Rows[0][3].ToString();
            cmbLoading.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][4].ToString()));
            cmbPort.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][5].ToString()));
            cmbFinalDest.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][5].ToString()));
            txtCFSClosing.Text = dt.Rows[0][6].ToString();
            txtCYClosing.Text  = dt.Rows[0][7].ToString();
            txtOnBoard.Text    = dt.Rows[0][8].ToString();
        }
    }
コード例 #27
0
    private void BindCombox()
    {
        DataFactory dal = new DataFactory();
        DataTable   dt  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "BLCal").Append("STAT", FSecurityHelper.CurrentUserDataGET()[12])
        }).GetTable();

        if (dt != null && dt.Rows.Count > 0)
        {
            Store1.DataSource = dt;
            Store1.DataBind();
        }

        DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "GetSmGroup")
        }).GetTable();

        if (dt1 != null && dt1.Rows.Count > 0)
        {
            Store2.DataSource = dt1;
            Store2.DataBind();
        }
    }
コード例 #28
0
    public void BindPreVoyag(string id)
    {
        if (id != "")
        {
            StorePreVoyage.RemoveAll();

            DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "VoyageList").
                Append("sys", FSecurityHelper.CurrentUserDataGET()[12]).
                Append("STAT", cmbpreVessel.Text)
            }).GetTable();
            StorePreVoyage.DataSource = dt1;
            StorePreVoyage.DataBind();

            DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "VoyageByID").
                Append("STAT", id)
            }).GetTable();

            cmbpreVoyage.SelectedItem.Value = id;

            txtpreonboard.Text = dt.Rows[0][8].ToString();
        }
    }
コード例 #29
0
    private DataSet GetDs()
    {
        DataSet ds = null;
        string  No = "", type = "";

        if (rdLot.Checked)
        {
            No   = txtLot.Text.Trim();
            type = "LOTNO";
        }
        else if (rdMbl.Checked)
        {
            No   = txtMbl.Text.Trim();
            type = "MBL";
        }
        else if (rdHbl.Checked)
        {
            No   = txtHbl.Text.Trim();
            type = "HBL";
        }
        else if (rdInvoice.Checked)
        {
            No   = txtInvoice.Text.Trim();
            type = "INVOICE";
        }
        DataFactory dal = new DataFactory();

        ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_CallShipmentForTR_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "GetID").Append("Type", type).Append("No", No)
            .Append("stat", FSecurityHelper.CurrentUserDataGET()[12])
        }).GetList();
        return(ds);
    }
コード例 #30
0
    private void ComboBoxBinding()
    {
        ControlBinder.CmbBinder(StoreLocation, "LocationList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreSalesman, "SalesList", SYS[0].ToString());
        //ControlBinder.CmbBinder(StoreCompany, "CompanyList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreUnit, "UnitBinding", SYS[0].ToString());

        o_unit.Template.Html = Template.Html;
        //ControlBinder.CmbBinder(StoreCurrency, "CurrencysList", SYS[0].ToString());
        //ControlBinder.CmbBinder(StoreItem, "ItemBinding", SYS[0].ToString());
        DataSet dsGetItem = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_GetItem_SP", new List <IFields> {
            dal.CreateIFields()
            .Append("Option", "GetItem").Append("STAT", FSecurityHelper.CurrentUserDataGET()[12]).Append("SYS", "O")
        }).GetList();

        StoreGetItem.DataSource = dsGetItem;
        StoreGetItem.DataBind();

        //l_item.Template.Html = Template.Html;
        //o_item.Template.Html = Template.Html;
        ControlBinder.CmbBinder(StoreKind, "QtyKindBinding", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreDept, "DeptBinding", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreForeignKind, "ForeignKind", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreShipKind, "ShipKind", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreCompanyKind, "CompanyKind", SYS[0].ToString());
        ControlBinder.CmbBinder(StorePPCC, "PPCCList", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreAgentLocal, "PPCC", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreServiceMode, "ServerMode", SYS[0].ToString());
        //ControlBinder.CmbBinder(StoreCurrLocal, "CurrencysListLocal", SYS[0].ToString());
        ControlBinder.CmbBinder(StoreCurrInvoice, "CurrencysInvoice", SYS[0].ToString());
    }