예제 #1
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);
 }
예제 #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["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));
    }
예제 #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
    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));
    }
예제 #6
0
 /// <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)
 }
    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));
    }
예제 #8
0
 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);
 }
예제 #9
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));
    }
예제 #10
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());
            }
        }
    }
예제 #11
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);
 }
예제 #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["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));
    }
예제 #13
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));
    }
예제 #14
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));
    }
예제 #15
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);
 }
예제 #16
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();
        }
    }
예제 #17
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();
 }
예제 #18
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();
 }
예제 #19
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();
    }
예제 #20
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["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));
    }
예제 #21
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();
    }
예제 #22
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;//旗標 Flag=1 訂單 Flag=2 生產計劃單
        dr["BillID"] = this.txtBillID.Text;//單號
        if (this.txtBillDate.Text.Length > 0) dr["BillDate"] = this.txtBillDate.Text;//日期
        dr["CustomerPO"] = this.txtCustomerPO.Text;//客戶PO
        dr["EnterpriseID"] = this.txtEnterpriseID.Text;//企業用戶編號
        dr["EnterpriseName"] = this.txtEnterpriseName.Text;//企業用戶名稱
        dr["Contact"] = this.txtContact.Text;//連絡人員
        dr["ContactPhone"] = this.txtContactPhone.Text;//聯絡電話
        dr["Fax"] = this.txtFax.Text;//公司傳真
        dr["BusPersonID"] = this.txtBusPersonID.Text;//業務員編號
        dr["BusPersonName"] = this.txtBusPersonName.Text;//業務員姓名
        dr["BillState"] = ddlBillState.SelectedIndex;//單況  0:有效 1:結案
        dr["DeliverCountry"] = this.txtDeliverCountry.Text;//送貨地址國別
        dr["DeliverAddress"] = this.txtDeliverAddress.Text;//送貨地址
        dr["DeliverMehtod"] = this.txtDeliverMehtod.Text;//交貨方式
        dr["Memo"] = this.txtMemo.Text;//備註
        //dr["TotalPages"] = int.Parse(this.txtTotalPages.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.txtBU_CheckDate.Text.Length > 0) dr["CheckDate"] = this.txtBU_CheckDate.Text;//營運覆核日期
        dr["CheckUserName"] = this.txtBU_CheckUserName.Text;//營運覆核人員

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

        DataTable dtSub1 = dal.GetSubDetail("").Tables[0];
        DataTable newdtb = Js.Com.JsonHelper.Json2Dtb(HdnSubDetail1.Value);
        for (int i = 0; i < newdtb.Rows.Count; i++)
        {
            DataRow dr1 = dtSub1.NewRow();
            dr1["Flag"] = Flag;
            dr1["BillID"] = this.txtBillID.Text;
            dr1["EnterpriseID"] = this.txtEnterpriseID.Text;
            dr1["BillDate"] = this.txtBillDate.DateValue;
            for (int j = 0; j < newdtb.Columns.Count; j++)
            {
                dr1[newdtb.Columns[j].ColumnName] = newdtb.Rows[i][j];
            }
            dtSub1.Rows.Add(dr1);
        }
        dtSub1.TableName = "LB_OrderSub";
        dal.SaveDetail(dtSub1, ID);
        Response.Redirect("OrderView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
    }
예제 #23
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["BillID"] = this.txtBillID.Text;//單號
        if (this.txtBillDate.Text.Length > 0) dr["BillDate"] = this.txtBillDate.Text;//日期
        dr["StyleID"] = this.txtStyleID1.Value;
        dr["SourceBillID"] = this.txtSourceBillID.Text;

        dr["ProducePages"] = this.txtProducePages.Text;
        dr["StdPages"] = this.txtStdPages.Text;
        dr["Volumes"] = this.txtVolumes.Text;
        dr["StartLabelNo"] = this.txtStartLabelNo.Text;
        dr["EndLabelNo"] = this.txtEndLabelNo.Text;
        dr["ProductionUnitID"] = this.ddlProductionUnitID.SelectedValue;
        dr["ScheduleBillID"] = this.txtScheduleBillID.Text;
        if (this.txtPreInStockDate.Text.Length > 0) dr["PreInStockDate"] = this.txtPreInStockDate.Text;
        dr["BillState"] = this.ddlBillState.SelectedIndex;

        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;//營運覆核用戶
        dr["Memo"] = this.txtMemo.Text;

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

        DataTable dtSub1 = dal.GetSubDetail("").Tables[0];
        DataTable newdtb = Js.Com.JsonHelper.Json2Dtb(HdnSubDetail1.Value);
        for (int i = 0; i < newdtb.Rows.Count; i++)
        {
            DataRow dr1 = dtSub1.NewRow();
            dr1["BillID"] = this.txtBillID.Text;
            //dr1["EnterpriseID"] = this.txtEnterpriseID.Text;
            dr1["BillDate"] = this.txtBillDate.DateValue;
            for (int j = 0; j < newdtb.Columns.Count; j++)
            {
                dr1[newdtb.Columns[j].ColumnName] = newdtb.Rows[i][j];
            }
            dtSub1.Rows.Add(dr1);
        }
        dtSub1.TableName = "LB_ProductionSub";
        dal.SaveDetail(dtSub1, ID);

        Response.Redirect("ProductionView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
    }
예제 #24
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        Js.BLL.Account.RoleDal dal = new Js.BLL.Account.RoleDal();
        dal.Delete(int.Parse(ViewState["RoleID"].ToString()));

        Js.BLL.BaseDal bdal = new Js.BLL.BaseDal(FormID);
        DataTable dt = bdal.GetRecord("1=1");
        BindTreeView(dt);

        ViewState["RoleID"] = this.TreeView1.SelectedNode.Value;

        BindGrid();
    }
예제 #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        FormID = Request.QueryString["FormID"];
        BillID = Request.QueryString["BillID"];
        if (!IsPostBack)
        {
            ViewState["StrWhere"] = string.Format(" BillID='{0}'", BillID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
            DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
            ViewState["dt"] = dt;

            BindData(dt);
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["AnnounceID"] = this.txtAnnounceID.Text;
        dr["Announcer"] = this.txtAnnouncer.Text;
        if (this.txtAnnounceFlag.Text == Resources.Resource.AnnounceFlag1)
            dr["AnnounceFlag"] = 0;
        else
            dr["AnnounceFlag"] = 1;
        dr["AnnounceUnitNo"] = this.txtAnnounceUnitNo.Text;
        dr["AnnouncerUserName"] = this.txtAnnouncerUserName.Text;

        if (this.txtSource.Text == Resources.Resource.AnnounceSource1)
            dr["Source"] = 0;
        else
            dr["Source"] = 1;
        dr["AnnounceDate"] = DateTime.Now;
        dr["Title"] = this.txtTitle.Text.Trim();
        dr["Contents"] = this.txtContents.Text.Trim();

        dal.Add(dr);

        DataTable dtSub = dal.GetSubDetail("").Tables[0];

        for (int i = 0; i < this.GridView1.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)(this.GridView1.Rows[i].FindControl("cbSelect"));
            if (cb.Checked)
            {
                DataRow subdr = dtSub.NewRow();
                subdr["AnnounceID"] = this.txtAnnounceID.Text;
                subdr["ReceiverUserName"] = this.GridView1.Rows[i].Cells[1].Text;
                if (this.GridView1.Rows[i].Cells[2].Text == Resources.Resource.AnnounceFlag1)
                    subdr["ReceiverFlag"] = 0;
                else
                    subdr["ReceiverFlag"] = 1;
                subdr["ReceiveUnitNo"] = this.GridView1.Rows[i].Cells[3].Text;
                subdr["Receiver"] = this.GridView1.Rows[i].Cells[4].Text;

                dtSub.Rows.Add(subdr);
            }
        }

        dal.SaveDetail(dtSub, "");

        Response.Redirect("AnnounceMessageView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtAnnounceID.Text));
    }
예제 #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["ID"] + "";
        txtBillID.Text = Request.QueryString["BillID"] + "";
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);

        DataTable dt = dal.GetRecord(string.Format(" ID='{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]["LabelMode"].ToString();
        this.txtDescription.Text = dt.Rows[0]["Description"].ToString();

        //HdnSubDetail1.Value = Js.Com.JsonHelper.Dtb2Json(new Js.DAO.Label.StyleDao(FormID, cnKey).GetLimitedProduct(ID));
    }
예제 #28
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"] = 2;
        dr["EnterPriseID"] = Session["EnterPriseID"].ToString();
        dr["EnterpriseName"] = Session["EnterpriseName"].ToString();
        dr["ResumeID"] = this.txtResumeID.Text.Trim();
        dr["ProductID"] = this.txtProductID.Text;
        dr["ProductName"] = this.txtProductName.Text;
        if (this.txtProduceDate.Text.Length > 0)
            dr["ProduceDate"] = DateTime.Parse(this.txtProduceDate.Text);
        dr["HasGarantee"] = this.ckbHasGarantee.Checked;
        if (this.txtProduceDate.Text.Length > 0)
            dr["GaranteeDate"] = DateTime.Parse(this.txtGaranteeDate.Text);
        dr["OfficalUrl"] = this.txtOfficalUrl.Text.Trim();
        dr["ServicePhone"] = this.txtServicePhone.Text.Trim();
        dr["Description"] = this.txtDescription.Text.Trim();
        dr["ResumeOfficalUrl"] = this.txtResumeOfficalUrl.Text.Trim();
        dr["EPResumeID"] = this.txtEPResumeID.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["BU_CheckUserName"] = "";
        dr["EP_CheckUserName"] = "";
        //dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;
        //if (this.txtBU_CheckDate.Text.Length > 0)
        //    dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;
        //dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;
        //if (this.txtEP_CheckDate.Text.Length > 0)
        //    dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;
        dr["UploadUserName"] = "";
        dr["State"] = 0;

        if (FormID == "EP_ProductResumeNoCheck" && ID.Length > 0)
            //dal.Update(dr, this.txtEnterpriseID.Text, string.Format(" ResumeID='{0}'", this.txtResumeID.Text));
            dal.Update(dr, this.txtResumeID.Text, string.Format(" EnterpriseID='{0}' and flag=2", this.txtEnterpriseID.Text));
        else
            dal.Add(dr);

        Response.Redirect("ProductResumeView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtResumeID.Text));
    }
예제 #29
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"] = Session["EnterPriseID"].ToString();
        dr["EnterpriseName"] = Session["EnterpriseName"].ToString();
        dr["PersonID"] = this.txtPersonID.Text;
        dr["DepartmentID"] = this.ddlDepartmentID.SelectedValue.ToString();
        dr["PersonName"] = this.txtPersonName.Text;
        dr["PersonEName"] = this.txtPersonEName.Text.Trim();
        //dr["IDNumber"] = this.txtIDNumber.Text.Trim();
        //if (this.txtBirthday.Text.Length > 0)
        //    dr["Birthday"] = this.txtBirthday.Text;
        dr["Post"] = this.txtPost.Text.Trim();
        //dr["HomePhone"] = this.txtHomePhone.Text.Trim();
        dr["CellPhone"] = this.txtCellPhone.Text.Trim();
        dr["Email"] = this.txtEmail.Text.Trim();
        //if (this.txtOnJobDate.Text.Length > 0)
        //    dr["OnJobDate"] = this.txtOnJobDate.Text;
        //if (this.txtLeftJobDate.Text.Length > 0)
        //    dr["LeftJobDate"] = this.txtLeftJobDate.Text;
        //dr["LinkMan"] = this.txtLinkMan.Text.Trim();
        //dr["Relation"] = this.txtRelation.Text.Trim();
        //dr["LinkPhone"] = this.txtLinkPhone.Text.Trim();
        dr["ContactAddress"] = this.txtContactAddress.Text.Trim();
        //dr["HomeAddress"] = this.txtHomeAddress.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, "EnterpriseID='" + this.txtEnterpriseID.Text + "'");
        else
            dal.Add(dr);
        Response.Redirect("PersonView.aspx?FormID=" + Server.UrlEncode(FormID)+ "&ID=" +  Server.UrlEncode(this.txtPersonID.Text));
    }
예제 #30
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        //BaseDal
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
        DataTable dt = dal.GetRecord("1=1");
        string OrderCode = dt.Rows[0]["OrderCode"].ToString();

        DataRow dr = dt.NewRow();
        dr["OrderCode"] = this.txtOrderCode.Value;
        dr["ScheduleCode"] = this.txtScheduleCode.Value;
        dr["ProductionCode"] = this.txtProductionCode.Value;
        dr["InStockCode"] = this.txtInStockCode.Value;
        dr["InvalidLabelCode"] = this.txtInvalidLabelCode.Value;
        dr["OutStockCode"] = this.txtDeliverCode.Value;
        dr["ReturnLabelCode"] = this.txtReturnLabelCode.Value;
        dr["TransferCode"] = this.txtTransferCode.Value;
        dr["EnableLabelNoCode"] = this.txtEnableLabelNoCode.Value;
        dr["LabelNoActionCode"] = this.txtLabelNoActionCode.Value;
        dr["BatchActionCode"] = this.txtBatchActionCode.Value;
        dr["LabelRegisterCode"] = this.txtLabelRegisterCode.Value;
        dr["BatchRegisterCode"] = this.txtBatchRegisterCode.Value;

        dr["PercentDecimalDigits"] = this.ddlPercentDecimalDigits.SelectedValue;
        int ServiceYears;
        int.TryParse(this.txtServiceYears.Text.Trim(), out ServiceYears);
        this.txtServiceYears.Text = ServiceYears.ToString();
        dr["ServiceYears"] = ServiceYears;
        dr["EnableMonths"] = this.ddlEnableMonths.Text;
        if (this.txtClearDate.Text.Length > 0)
            dr["ClearDate"] = this.txtClearDate.Text;
        if (this.txtCloseDate.Text.Length > 0)
            dr["CloseDate"] = this.txtCloseDate.Text;
        dr["LastModifyUserName"] = Session["User"].ToString();
        if (this.txtLastModifyDate.Text.Length > 0)
            dr["LastModifyDate"] = DateTime.Now;

        if (OrderCode.Length > 0)
            dal.Update(dr, OrderCode);
        else
            dal.Add(dr);
        //BindData();
        this.btnEdit.Enabled = true;
        this.btnSave.Enabled = false;
        this.btnCancel.Enabled = false;
        InitialCtl();
    }