Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        strID = Request.QueryString["ID"] + "";
        this.dgViewSub1.PageSize = pageSubSize;
        if (!IsPostBack)
        {
            BindDropDownList();
            if (strID != "")
            {
                DataTable dt = bll.FillDataTable("WMS.SelectBillMaster", new DataParameter[] { new DataParameter("{0}", string.Format("BillID='{0}'", strID)) });
                BindData(dt);

                SetTextReadOnly(this.txtID);
            }
            else
            {
                BindDataSub();

                txtBillDate.changed        = "$('#txtID').val(autoCodeByTableName('IS', '1=1','WMS_BillMaster', 'txtBillDate'));";
                this.txtBillDate.DateValue = DateTime.Now;
                this.txtID.Text            = bll.GetAutoCodeByTableName("IS", "WMS_BillMaster", DateTime.Now, "1=1");

                this.txtCreator.Text    = Session["EmployeeCode"].ToString();
                this.txtUpdater.Text    = Session["EmployeeCode"].ToString();
                this.txtCreatDate.Text  = ToYMD(DateTime.Now);
                this.txtUpdateDate.Text = ToYMD(DateTime.Now);
            }
        }

        ScriptManager.RegisterStartupScript(this.updatePanel1, this.updatePanel1.GetType(), "Resize", "resize();BindEvent();", true);
        writeJsvar(FormID, SqlCmd, strID);
        SetTextReadOnly(this.txtTotalQty, this.txtCreator, this.txtCreatDate, this.txtUpdater, this.txtUpdateDate);
    }
Ejemplo n.º 2
0
    public ReturnData autoCodeByTableName(string xmlpara)
    {
        ReturnData rr = new ReturnData();
        try
        {

            BLL.BLLBase bll = new BLL.BLLBase();

            DataTable dt = Util.JsonHelper.Json2Dtb(xmlpara);
            string PreName = dt.Rows[0]["PreName"].ToString();
            string dtTime = dt.Rows[0]["dtTime"].ToString();
            string TableName = dt.Rows[0]["TableName"].ToString();
            string Filter = dt.Rows[0]["Filter"].ToString();

            string strCode = bll.GetAutoCodeByTableName(PreName, TableName, DateTime.Parse(dtTime), Filter);
            rr.data = strCode;
            rr.type = "" + strCode.GetType();
        }
        catch (Exception ex)
        {

        }

        return rr;
    }
Ejemplo n.º 3
0
    public ReturnData autoCodeByTableName(string xmlpara)
    {
        ReturnData rr = new ReturnData();

        try
        {
            BLL.BLLBase bll = new BLL.BLLBase();

            DataTable dt        = Util.JsonHelper.Json2Dtb(xmlpara);
            string    PreName   = dt.Rows[0]["PreName"].ToString();
            string    dtTime    = dt.Rows[0]["dtTime"].ToString();
            string    TableName = dt.Rows[0]["TableName"].ToString();
            string    Filter    = dt.Rows[0]["Filter"].ToString();

            string strCode = bll.GetAutoCodeByTableName(PreName, TableName, DateTime.Parse(dtTime), Filter);
            rr.data = strCode;
            rr.type = "" + strCode.GetType();
        }
        catch (Exception ex)
        {
        }

        return(rr);
    }