コード例 #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();

        dr["StateID"] = this.txtStateListID.Text;
        dr["StateName"] = this.txtStateName.Text;
        dr["Style"] = this.ddlStyle.SelectedIndex;
        dr["Description"] = this.txtMemo.Text;
        dr["ImageProvider"] = this.chkImageProvider.Checked;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtCreateDate.Text.Length > 0)
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["LastModifyDate"] = DateTime.Now;// this.txtLastModifyDate.Text;//異動日期
        dr["LastModifyUserName"] = Session["User"].ToString();// this.txtLastModifyUserName.Text;//異動人員
        if (this.txtCheckDate.Text.Length > 0)
        dr["CheckDate"] = this.txtCheckDate.Text;
        dr["CheckUserName"] = this.txtCheckUserName.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        Response.Redirect("StateListView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtStateListID.Text));
    }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["cnKey"] != null)
         cnKey = Session["cnKey"].ToString();
     ID = Request.QueryString["ID"] + "";
     FormID = Request.QueryString["FormID"] + "";
     if (!IsPostBack)
     {
         ViewState["StrWhere"] = string.Format(" PersonID='{0}' and EnterpriseID='{1}'", ID, Session["EnterpriseID"].ToString());
         BindDropDownList();
         Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
         if (ID != "")
         {
             DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
             BindData(dt);
             this.txtPersonID.ReadOnly = true;
         }
         else
         {
             this.txtPersonID.Text = dal.GetMaxID("EnterpriseID='" + Session["EnterpriseID"].ToString() + "'");
             this.txtEnterpriseID.Text = Session["EnterpriseID"].ToString();
             this.txtEnterpriseName.Text = Session["EnterpriseName"].ToString();
             this.txtLastModifyUserName.Text = Session["User"].ToString();
             this.txtLastModifyDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
             this.txtCreateUserName.Text = Session["User"].ToString();
             this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
         }
     }
 }
コード例 #3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["ProductionUnitID"] = this.txtProductionUnitID.Text;
        dr["ProductionUnitName"] = this.txtProductionUnitName.Text;
        dr["Memo"] = this.txtMemo.Text.Trim();
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["LastModifyUserName"] = Session["User"].ToString();
        dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
        dr["CheckUserName"] = this.txtCheckUserName.Text;
        if (this.txtCheckDate.Text.Length > 0)
            dr["CheckDate"] = this.txtCheckDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        //Response.Redirect("Departments.aspx?FormID=" + Server.UrlEncode(FormID));
        Response.Redirect("ProductionUnitView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtProductionUnitID.Text));
    }
コード例 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        BillID = Request.QueryString["BillID"] + "";
        FormID = Request.QueryString["FormID"] + "";
        if (!IsPostBack)
        {
            ViewState["StrWhere"] = string.Format(" BillID='{0}'", BillID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
            if (BillID != "")
            {
                DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
                BindData(dt);
                this.txtBillID.ReadOnly = true;
            }
            else
            {
                this.txtBillID.Text = dal.GetMaxID();
                this.txtLastModifyUserName.Text = Session["User"].ToString();
                this.txtLastModifyDate.Text = DateTime.Now.ToString(Js.Com.User.strDateFormat);
                this.txtCreateUserName.Text = Session["User"].ToString();
                this.txtCreateDate.Text = DateTime.Now.ToString(Js.Com.User.strDateFormat);
            }

        }
    }
コード例 #5
0
ファイル: Orders.aspx.cs プロジェクト: qq5013/SenseDigital
    protected void btnDeletet_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey);
        // Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal();
        int iReturn = 0;
        for (int i = 0; i < this.GridView1.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)(this.GridView1.Rows[i].FindControl("cbSelect"));
            if (cb.Checked)
            {
                HyperLink hk = (HyperLink)(this.GridView1.Rows[i].FindControl("HyperLink1"));
                iReturn = sdal.GetBillCanBeEdit(FormID, hk.Text);// "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'");

                if (iReturn == 1)
                    JScript.Instance.ShowMessage(this.updatePanel, hk.Text + Resources.Resource.NotDelete_Checked);
                else if (iReturn == 2)
                    JScript.Instance.ShowMessage(this.updatePanel, hk.Text + Resources.Resource.NotDelete_IsUsed);
                else
                {
                    dal.Delete(hk.Text);//, "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'");
                    dal.DeleteDetail(hk.Text);
                }
            }
        }
        SetBtnEnabled("");
    }
コード例 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["BillID"] + "";
        FormID = Request.QueryString["FormID"] + "";
        if (!IsPostBack)
        {
            ViewState["StrWhere"] = string.Format(" BillID='{0}'", ID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
            if (ID != "")
            {
                DataTable dt = dal.GetViewRecord(ViewState["StrWhere"].ToString());
                BindData(dt);
                this.txtBillID.ReadOnly = true;
                this.txtBillID.CssClass = "TextRead";
            }
            else
            {
                this.txtBillID.Text = dal.GetAutoCode(DateTime.Now);
                this.txtBillDate.DateValue = DateTime.Now;
                this.txtLastModifyUserName.Text = Session["User"].ToString();
                this.txtLastModifyDate.Text = ToYMDHM(DateTime.Now);
                this.txtCreateUserName.Text = Session["User"].ToString();
                this.txtCreateDate.Text = ToYMDHM(DateTime.Now);
            }

            BindEdll();

            BindOther();
        }
    }
コード例 #7
0
ファイル: Upload.aspx.cs プロジェクト: qq5013/SenseDigital
    private void BindEdll()
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
        string filter = "1=1";
        if (this.rbFileType2.Checked)
            filter = "1=2";
        DataTable dt = dal.GetDistinctRecord("FileDesc", filter);

        if (this.rbFileType2.Checked)
        {
            DataRow dr = dt.NewRow();
            dr["FileDesc"] = Resources.Resource.EP_ProductDesc;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["FileDesc"] = Resources.Resource.EP_ProductResumeDesc;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["FileDesc"] = Resources.Resource.EP_ProductLogistics;
            dt.Rows.Add(dr);

        }
        this.txtFileDesc.DataSource = dt;
    }
コード例 #8
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["WarehouseID"] = this.txtWarehouseID.Text.Trim().ToUpper();
        dr["WarehouseName"] = this.txtWarehouseName.Text;
        dr["Contact"] = this.txtContact.Text.Trim();
        dr["ContactPhone"] = this.txtContactPhone.Text.Trim();
        dr["Address"] = this.txtAddress.Text.Trim();
        dr["Memo"] = this.txtMemo.Text.Trim();
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["LastModifyUserName"] = Session["User"].ToString();
        dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
        dr["CheckUserName"] = this.txtCheckUserName.Text;
        if (this.txtCheckDate.Text.Length > 0)
            dr["CheckDate"] = this.txtCheckDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
        {
            dal.Add(dr);
            //插入標籤數量
            Js.BLL.Label.StyleDal sdal = new Js.BLL.Label.StyleDal(cnKey);
            sdal.InsertWarehousePagesByWID(this.txtWarehouseID.Text.Trim().ToUpper(), Session["User"].ToString());
        }

        //Response.Redirect("Departments.aspx?FormID=" + Server.UrlEncode(FormID));
        Response.Redirect("WarehouseView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtWarehouseID.Text));
    }
コード例 #9
0
 protected void btnPre_Click(object sender, EventArgs e)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
     DataTable dt = dal.GetRecord("P", this.txtProductionUnitID.Text);
     if (dt != null)
         BindData(dt);
 }
コード例 #10
0
 private void BindGrid()
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, Session["EnterpriseID"].ToString());
     DataTable dt = dal.GetViewRecord(ViewState["StrWhere"].ToString());
     this.GridView1.DataSource = dt;
     this.GridView1.DataBind();
 }
コード例 #11
0
    private void BindDetail(string ID)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);

        string filter = string.Format("Flag=1 and {0}='{1}'", KeyField, ID);
        DataTable dt = dal.GetSubDetail(EnterpriseID, filter).Tables[0];
        this.GridView2.DataSource = dt.DefaultView;
        this.GridView2.DataBind();

        filter = string.Format("Flag=2 and {0}='{1}'", KeyField, ID);
        dt = dal.GetSubDetail(EnterpriseID, filter).Tables[0];
        this.GridView3.DataSource = dt.DefaultView;
        this.GridView3.DataBind();
        if (GridView2.Rows.Count != 0 && GridView3.Rows.Count != 0)
        {
            for (var i = 0; i < this.GridView2.Columns.Count; i++)
            {
                if (GridView2.Rows[0].Cells[i].Text != GridView3.Rows[0].Cells[i].Text)
                {
                    GridView2.Rows[0].Cells[i].ForeColor = System.Drawing.Color.Red;
                    GridView3.Rows[0].Cells[i].ForeColor = System.Drawing.Color.Red;
                }
            }
        }
    }
コード例 #12
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["MemberID"] = this.txtMemberID.Text;
        dr["Country"] = this.EddlCountry.Text;
        dr["Password"] = this.txtPassword.Text.Trim();
        dr["PasswordHint"] = this.txtPasswordHint.Text.Trim();
        dr["Name"] = this.txtName.Text.Trim();
        if (this.ddlSex.SelectedIndex > 0)
            dr["Sex"] = 1;
        else
            dr["Sex"] = 0;
        dr["EMail"] = this.txtEMail.Text;
        dr["SpareEMail"] = this.txtSpareEMail.Text;
        if(this.txtBirthday.Text.Trim().Length>0)
            dr["Birthday"] = this.txtBirthday.Text;
        dr["CellPhone"] = this.txtCellPhone.Text;
        dr["LinkPhone"] = this.txtLinkPhone.Text;
        dr["ZipCode1"] = this.txtZipCode1.Text;
        dr["Address1"] = this.txtAddress1.Text;
        dr["ZipCode2"] = this.txtZipCode2.Text;
        dr["Address2"] = this.txtAddress2.Text;
        dr["WebSite"] = this.txtWebSite.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        Response.Redirect("MemberView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtMemberID.Text));
    }
コード例 #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["ID"] + "";
        FormID = Request.QueryString["FormID"] + "";
        if (!IsPostBack)
        {
            ViewState["StrWhere"] = string.Format(" AnnounceID='{0}'", ID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
            DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
            ViewState["dt"] = dt;

            BindData(dt);
            Js.BLL.System.MessageDal mdal = new Js.BLL.System.MessageDal();
            int UserFlag;

            if (this.txtAnnouncerUserName.Text == Session["User"].ToString())
            {
                UserFlag = int.Parse(this.txtReceiverFlag0.Text);
                mdal.UpdateMessageRead1(ID, UserFlag, this.txtReceiverUserName.Text);
            }
            else
            {
                UserFlag = Session["UserType"].ToString() == "BU" ? 0 : 1;
                mdal.UpdateMessageRead(ID, UserFlag, Session["User"].ToString());
            }
        }
    }
コード例 #14
0
 protected void btnPre_Click(object sender, EventArgs e)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
     DataTable dt = dal.GetRecord("P", this.ddlRoleID.SelectedValue);
     if (dt != null)
         BindData(dt);
 }
コード例 #15
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["Flag"] = Flag;//旗標
        dr["BillID"] = this.txtBillID.Text;//上架單號
        if (this.txtEnableDate.Text.Length > 0) dr["EnableDate"] = this.txtEnableDate.DateValue;//日期
        dr["EnterpriseID"] = this.txtEnterpriseID.Text;//企業用戶編號
        dr["EnterpriseName"] = this.txtEnterpriseName.Text;//企業用戶名稱
        dr["BillState"] = this.ddlBillState.SelectedIndex;//狀態 0未上架、1異常待修正、2檢查OK、3上架中、4已上架
        dr["QtyTotal"] = int.Parse(this.txtQtyTotal.Text);//數量合計
        if (this.txtCreateDate.Text.Length > 0) dr["CreateDate"] = this.txtCreateDate.Text;//建檔日期
        dr["CreateUserName"] = this.txtCreateUserName.Text;//建檔人員
        if (this.txtLastModifyDate.Text.Length > 0) dr["LastModifyDate"] = this.txtLastModifyDate.Text;//異動日期
        dr["LastModifyUserName"] = this.txtLastModifyUserName.Text;//異動人員
        if (this.txtEP_CheckDate.Text.Length > 0) dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;//建檔日期
        dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;//營運覆核
        if (this.txtBU_CheckDate.Text.Length > 0) dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;//營運覆核日期
        dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;//營運覆核用戶

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        Response.Redirect("EnableLabelNoView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
    }
コード例 #16
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["EnterpriseID"] = this.txtEnterpriseID.Text;
        dr["EnterpriseName"] = this.txtEnterpriseName.Text;
        dr["BillID"] = this.txtBillID.Text.Trim();
        dr["QtyTotal"] = this.txtQtyTotal.Text.Trim();
        dr["BillState"] = this.txtBillState.Text.Trim();
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["LastModifyUserName"] = Session["User"].ToString();
        dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
        dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;
        if (this.txtEP_CheckDate.Text.Length > 0)
            dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;
        dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;
        if (this.txtBU_CheckDate.Text.Length > 0)
            dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;
        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        Response.Redirect("InvalidLabelView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
    }
コード例 #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["ID"] + "";
        string Flag = Request.QueryString["Flag"] + "";  //shj
        switch(Flag)
        {
            case "1":
                this.ltlBillID.Text = Resources.Resource.LB_Order_BillID;
                break;
            case "2":
              this.ltlBillID.Text = Resources.Resource.LB_Schedule_BillID;
                break;
            case "3":
                this.ltlBillID.Text = Resources.Resource.LB_Production_BillID;
                break;

        }

        txtBillID.Text = Request.QueryString["BillID"] + "";
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);

        DataTable dt = dal.GetRecord(string.Format(" StyleID='{0}'", ID));
        //this.txtEnterpriseID.Text = dt.Rows[0]["EnterPriseID"].ToString();
        //this.txtEnterpriseName.Text = dt.Rows[0]["EnterpriseName"].ToString();
        this.txtStyleID.Text = dt.Rows[0]["StyleID"].ToString();
        this.txtLabelMode.Text = dt.Rows[0]["StyleName"].ToString();
        Image1.ImageUrl = dt.Rows[0]["ImageLocation"].ToString();
        //HdnSubDetail1.Value = Js.Com.JsonHelper.Dtb2Json(new Js.DAO.Label.StyleDao(FormID, cnKey).GetLimitedProduct(ID));
    }
コード例 #18
0
    protected void btnStop_Click(object sender, EventArgs e)
    {
        DataRow dr = ((DataTable)ViewState["dt"]).Rows[0];
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);

        if (this.txtStopUserName.Text.Length > 0)
        {
            dr["StopUserName"] = "";
            dr["StopDate"] = DBNull.Value;
        }
        else
        {
            dr["StopUserName"] = Session["User"].ToString();
            dr["StopDate"] = DateTime.Now;
        }
        if (FormID == "EP_ProductLogistics")
        {
            dal.Update(dr, this.txtLogisticsID.Text, "EnterpriseID='" + this.txtEnterpriseID.Text + "' and flag=1 ");
            ViewState["StrWhere"] = string.Format(" LogisticsID='{0}' and EnterpriseID='{1}' and flag=1 ", this.txtLogisticsID.Text, this.txtEnterpriseID.Text);
        }
        else
        {
            dal.Update(dr, this.txtLogisticsID.Text, "EnterpriseID='" + this.txtEnterpriseID.Text + "' and flag=2");
            ViewState["StrWhere"] = string.Format(" LogisticsID='{0}' and EnterpriseID='{1}' and flag=2", this.txtLogisticsID.Text, this.txtEnterpriseID.Text);
        }
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());

        BindData(dt);
    }
コード例 #19
0
ファイル: StyleView.aspx.cs プロジェクト: qq5013/SenseDigital
 protected void btnNext_Click(object sender, EventArgs e)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
     DataTable dt = dal.GetRecord("N", this.txtStyleID.Text);
     if (dt != null)
         BindData(dt);
 }
コード例 #20
0
 private void BindData()
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
     DataTable dt = dal.GetSubDetail(EnterpriseID).Tables[0];
     this.GridView1.DataSource = dt.DefaultView;
     this.GridView1.DataBind();
 }
コード例 #21
0
ファイル: BasePage.cs プロジェクト: qq5013/SenseDigital
 /// <summary>
 /// 取得比率位數 
 /// </summary>
 /// <returns></returns>
 public string GetSparesFormat()
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal("BU_Parameter");
     DataTable dt = dal.GetRecord("1=1");
     return (dt != null && dt.Rows.Count > 0 ? "N" + dt.Rows[0]["PercentDecimalDigits"].ToString().Trim() : "N0");
     //string.Format ("{0:N2}",111)
 }
コード例 #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["ID"] + "";
        FormID = Request.QueryString["FormID"] + "";
        if (!IsPostBack)
        {

            ViewState["StrWhere"] = string.Format(" ProductionUnitID='{0}'", ID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
            if (ID != "")
            {
                DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
                BindData(dt);
                this.txtProductionUnitID.ReadOnly = true;
            }
            else
            {
                this.txtProductionUnitID.Text = dal.GetMaxID();
                this.txtLastModifyUserName.Text = Session["User"].ToString();
                this.txtLastModifyDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
                this.txtCreateUserName.Text = Session["User"].ToString();
                this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
            }
            //BindEdll();
        }
    }
コード例 #23
0
 protected void btnPre_Click(object sender, EventArgs e)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
     DataTable dt = dal.GetRecord("P", this.txtEnterpriseID.Text);
     if (dt != null)
         BindData(dt);
 }
コード例 #24
0
 protected void btnQuery_Click(object sender, EventArgs e)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
     //DataTable dtSub = dal.GetSubDetail(this.txtMemberID.Text).Tables[0];
     DataTable dtSub = dal.GetRecord(string.Format("MemberID ='{0}'", this.txtMemberID.Text.Trim()));
     this.GridView1.DataSource = dtSub.DefaultView;
     this.GridView1.DataBind();
 }
コード例 #25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string FormID = Request.QueryString["FormID"] + "";
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
     DataTable dt = dal.GetRecord("1=1");
     this.GridView1.DataSource = dt;
     this.GridView1.DataBind();
 }
コード例 #26
0
    protected void ddlEnterpriseID_SelectedIndexChanged(object sender, EventArgs e)
    {
        ViewState["StrWhere"] = string.Format(" EnterpriseID='{0}'", this.ddlEnterpriseID.SelectedValue.ToString());
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());

        BindData(dt);
        SetSession();
    }
コード例 #27
0
ファイル: StyleEdit.aspx.cs プロジェクト: qq5013/SenseDigital
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID,cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();

           // dr["ID"] = this.txtEnterpriseID.Text.Trim().ToUpper() + "_" + this.txtStyleID.Text.Trim().ToUpper();
           // dr["EnterpriseID"] = this.txtEnterpriseID.Text.ToUpper();
        dr["StyleName"] = this.txtStyleName.Text;
        dr["StyleID"] = this.txtStyleID.Text.Trim().ToUpper();
        dr["Volumes"] = this.txtVolumes.DataValue;
        dr["StdPages"] = this.txtStdPages.DataValue;
        dr["ImageLocation"] = this.ddlImageLocation.Text.Trim();
        dr["Length"] = this.txtLength_R.DataValue;
        dr["Width"] = this.txtWidth_R.DataValue;
        dr["Height"] = this.txtHeight_R.DataValue;
        dr["QRContent"] = this.ddlQRContent.Text.Trim();
        dr["ProductionNo"] = this.txtProductionNo.Text.Trim();
        dr["QR_X"] = this.txtQR_X_R.DataValue;
        dr["QR_Y"] = this.txtQR_Y_R.DataValue;
        dr["QR_Length"] = this.txtQR_Length_R.DataValue;
        dr["QR_Width"] = this.txtQR_Width_R.DataValue;
        dr["NowVolumes"] = this.txtNowVolumes.DataValue;
        dr["NowPages"] = this.txtNowPages.DataValue;
        dr["ImagePath"] = this.txtImagePath.Text.Trim();
        dr["ServiceYears"] = byte.Parse(this.txtServiceYears.Text.Trim());
        dr["EnableMonths"] = byte.Parse(this.ddlEnableMonths.SelectedValue.ToString());
        dr["Description"] = this.txtDescription.Text.Trim();
        dr["AntiFakeDesc1"] = this.txtAntiFakeDesc1.Text.Trim();
        dr["ImagePath1"] = this.txtImagePath1.Text.Trim();
        dr["AntiFakeDesc2"] = this.txtAntiFakeDesc2.Text.Trim();
        dr["ImagePath2"] = this.txtImagePath2.Text.Trim();
        dr["AntiFakeDesc3"] = this.txtAntiFakeDesc3.Text.Trim();
        dr["ImagePath3"] = this.txtImagePath3.Text.Trim();
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["LastModifyUserName"] = Session["User"].ToString();
        dr["LastModifyDate"] = DateTime.Now;//.ToString(Js.Com.User.strDateFormat);
        dr["CheckUserName"] = this.txtCheckUserName.Text;
        if (this.txtCheckDate.Text.Length > 0)
            dr["CheckDate"] = this.txtCheckDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
        {
            dal.Add(dr);
            //插入標籤數量
            Js.BLL.Label.StyleDal sdal = new Js.BLL.Label.StyleDal(cnKey);
            sdal.InsertWarehousePagesByStyleID(this.txtStyleID.Text.Trim().ToUpper(), Session["User"].ToString());
        }

        Response.Redirect("StyleView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtStyleID.Text));
    }
コード例 #28
0
    protected void ddlRoleID_SelectedIndexChanged(object sender, EventArgs e)
    {
        ViewState["StrWhere"] = string.Format(" RoleID={0}", this.ddlRoleID.SelectedValue);
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);

        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        BindData(dt);
        GetUserLevel();
        CheckDefaultUser();
    }
コード例 #29
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
        string strID = this.ddlRoleID.SelectedValue;
        dal.Delete(strID);

        btnNext_Click(sender, e);
        if (this.ddlRoleID.SelectedValue == strID)
            btnPre_Click(sender, e);
    }
コード例 #30
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
        string strID = this.txtEnterpriseID.Text;
        dal.Delete(strID);

        btnNext_Click(sender, e);
        if (this.txtEnterpriseID.Text == strID)
            btnPre_Click(sender, e);
    }