예제 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
예제 #2
0
    protected void Btnsave_Click(object sender, System.EventArgs e)
    {
        try
        {
            SqlConnection conn = new SqlConnection(DbSmartCode.x);

            SqlCommand Syscmd = new SqlCommand();
            Syscmd.CommandType = CommandType.StoredProcedure;
            Syscmd.CommandText = "Sp_Export_Data";

            DateTime shipDate = DateTime.ParseExact(txtentdt.Text, "d", null);
            Syscmd.Parameters.AddWithValue("@sp_Date", shipDate);
            Syscmd.Parameters.AddWithValue("@sp_StyleID", GetStyle.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_POLot", GetPo.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_ColorID", GetColor.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_CompanyID", GetFactory.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_Size", GetSize.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_SizeQty", int.Parse(txtShipQty.Text.Trim()));
            Syscmd.Parameters.AddWithValue("@sp_User", this.Session["Username"].ToString());
            Syscmd.Parameters.AddWithValue("@sp_Fob", decimal.Parse(txtFob.Text.Trim()));

            Syscmd.Connection = conn;
            conn.Open();

            Syscmd.ExecuteNonQuery();
            conn.Close();
        }
        catch (Exception ex)
        {
        }

        GetSize.ClearSelection();
        txtShipQty.Text = string.Empty;
    }
예제 #3
0
        public void Setup([NotNull] Type inType, [NotNull] GetSize inGetSize, SetSize inSetSize)
        {
                        #if DEV_MODE && PI_ASSERTATIONS
            Debug.Assert(inType != null);
            Debug.Assert(inGetSize != null);
                        #endif

            type    = inType;
            getSize = inGetSize;
            setSize = inSetSize;
        }
예제 #4
0
    private void BindGetSize()
    {
        GetSize.Items.Clear();
        //GetSize.Items.Add(new ListItem("-", ""));
        //GetSize.AppendDataBoundItems = true;
        SqlConnection conn      = new SqlConnection(DbSpecFo.x);
        String        strQuery1 = @"select distinct sm.cStyleNo,om.cPoNum,so.Size1,so.Size2,so.Size3,so.Size4,so.Size5,so.Size6,so.Size7,so.Size8,so.Size9,so.Size10,so.Size11,so.Size12,so.Size13,so.Size14,so.Size15 
                from Smt_OrdersMaster om join Smt_StyleMaster sm on om.nOStyleId=sm.nStyleID 
                join Smt_OrderSize so on om.nOStyleId=so.nStyleID 
                where sm.cStyleNo='" + GetStyle.SelectedItem.Text + "' and om.cPoNum='" + GetPo.SelectedItem.Text + "' ";

        //SqlCommand cmd1 = new SqlCommand();
        //cmd1.CommandType = CommandType.Text;
        //cmd1.CommandText = strQuery1;
        //cmd1.Connection = conn;
        try
        {
            conn.Open();
            SqlDataAdapter da = new SqlDataAdapter(strQuery1, conn);
            DataTable      dt = new DataTable();
            da.Fill(dt);
            List <string> size = new List <string>();
            if (dt.Rows.Count > 0)
            {
                int i;
                for (i = 2; i <= dt.Columns.Count - 1; i++)
                {
                    string sz = dt.Rows[0][i].ToString();
                    if (!String.IsNullOrWhiteSpace(sz))
                    {
                        size.Add(sz);
                    }
                }
            }
            GetSize.DataSource = size;
            //GetSize.DataTextField = "cColour";
            GetSize.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            conn.Close();
            conn.Dispose();
        }
    }
예제 #5
0
    protected void Btnsave_Click(object sender, System.EventArgs e)
    {
        try
        {
            SqlConnection conn = new SqlConnection(DbSmartCode.x);

            SqlCommand Syscmd = new SqlCommand();
            Syscmd.CommandType = CommandType.StoredProcedure;
            Syscmd.CommandText = "Sp_Shipment_Data";

            DateTime shipDate = DateTime.ParseExact(txtentdt.Text, "d", null);
            Syscmd.Parameters.AddWithValue("@sp_Date", shipDate);
            //string line = drpLine.SelectedValue.ToString();
            //Syscmd.Parameters.AddWithValue("@line_no", line);
            //Syscmd.Parameters.AddWithValue("@ord_no", txtOrder.Text.Trim());
            Syscmd.Parameters.AddWithValue("@sp_StyleID", GetStyle.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_POLot", GetPo.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_ColorID", GetColor.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_CompanyID", GetFactory.SelectedValue.ToString());
            Syscmd.Parameters.AddWithValue("@sp_Size", GetSize.SelectedItem.ToString());
            Syscmd.Parameters.AddWithValue("@sp_SizeQty", int.Parse(txtShipQty.Text.Trim()));
            Syscmd.Parameters.AddWithValue("@sp_User", this.Session["Username"].ToString());

            //Syscmd.Parameters.AddWithValue("@ord_buyer", txtBuyer.Text.Trim());
            //Syscmd.Parameters.AddWithValue("@target_hr", int.Parse(txtTargerHr.Text.Trim()));
            //Syscmd.Parameters.AddWithValue("@target_dy", int.Parse(txtTargetDy.Text.Trim()));
            //Syscmd.Parameters.AddWithValue("@ord_factory", txtOrdFactory.Text.Trim());

            //Syscmd.Parameters.AddWithValue("@plan_hr", int.Parse(txtPlanHr.Text.Trim()));
            //int size = int.Parse(drpHour.SelectedValue.ToString());
            //Syscmd.Parameters.AddWithValue("@prodHr", prodHr);
            //int hrValue = int.Parse(txtHour.Text.Trim());
            //Syscmd.Parameters.AddWithValue("@hrValue", hrValue);

            Syscmd.Connection = conn;
            conn.Open();

            Syscmd.ExecuteNonQuery();
            conn.Close();
        }
        catch (Exception ex)
        {
        }

        GetSize.ClearSelection();
        txtShipQty.Text = string.Empty;
        //Response.Redirect(Request.RawUrl); //page refreash
    }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:IndexConnector" /> class.
        /// </summary>
        /// <param name="getWordFetcher">The GetWordFetcher delegate.</param>
        /// <param name="getSize">The GetSize delegate.</param>
        /// <param name="getCount">The GetCount delegate.</param>
        /// <param name="clearIndex">The ClearIndex delegate.</param>
        /// <param name="deleteData">The DeleteDataForDocument delegate.</param>
        /// <param name="saveData">The SaveData delegate.</param>
        /// <param name="tryFindWord">The TryFindWord delegate.</param>
        public IndexConnector(GetWordFetcher getWordFetcher, GetSize getSize, GetCount getCount, ClearIndex clearIndex,
                              DeleteDataForDocument deleteData, SaveDataForDocument saveData, TryFindWord tryFindWord)
        {
            if (getWordFetcher == null)
            {
                throw new ArgumentNullException("getWordFetcher");
            }

            if (getSize == null)
            {
                throw new ArgumentNullException("getSize");
            }

            if (getCount == null)
            {
                throw new ArgumentNullException("getCount");
            }

            if (clearIndex == null)
            {
                throw new ArgumentNullException("clearIndex");
            }

            if (deleteData == null)
            {
                throw new ArgumentNullException("deleteData");
            }

            if (saveData == null)
            {
                throw new ArgumentNullException("saveData");
            }

            if (tryFindWord == null)
            {
                throw new ArgumentNullException("tryFindWord");
            }

            this.getWordFetcher = getWordFetcher;
            this.getSize        = getSize;
            this.getCount       = getCount;
            this.clearIndex     = clearIndex;
            this.deleteData     = deleteData;
            this.saveData       = saveData;
            this.tryFindWord    = tryFindWord;
        }
예제 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:IndexConnector" /> class.
        /// </summary>
        /// <param name="getWordFetcher">The GetWordFetcher delegate.</param>
        /// <param name="getSize">The GetSize delegate.</param>
        /// <param name="getCount">The GetCount delegate.</param>
        /// <param name="clearIndex">The ClearIndex delegate.</param>
        /// <param name="deleteData">The DeleteDataForDocument delegate.</param>
        /// <param name="saveData">The SaveData delegate.</param>
        /// <param name="tryFindWord">The TryFindWord delegate.</param>
        public IndexConnector(GetWordFetcher getWordFetcher, GetSize getSize, GetCount getCount, ClearIndex clearIndex,
            DeleteDataForDocument deleteData, SaveDataForDocument saveData, TryFindWord tryFindWord)
        {
            if(getWordFetcher == null) throw new ArgumentNullException("getWordFetcher");
            if(getSize == null) throw new ArgumentNullException("getSize");
            if(getCount == null) throw new ArgumentNullException("getCount");
            if(clearIndex == null) throw new ArgumentNullException("clearIndex");
            if(deleteData == null) throw new ArgumentNullException("deleteData");
            if(saveData == null) throw new ArgumentNullException("saveData");
            if(tryFindWord == null) throw new ArgumentNullException("tryFindWord");

            this.getWordFetcher = getWordFetcher;
            this.getSize = getSize;
            this.getCount = getCount;
            this.clearIndex = clearIndex;
            this.deleteData = deleteData;
            this.saveData = saveData;
            this.tryFindWord = tryFindWord;
        }
예제 #8
0
        public static LinkedMemberInfo CreateForCollectionResizer(LinkedMemberHierarchy hierarchy, [NotNull] LinkedMemberInfo parent, [NotNull] Type type, GetSize getSizeDelegate, SetSize setSizeDelegate)
        {
                        #if DEV_MODE && PI_ASSERTATIONS
            Debug.Assert(parent != null, " CreateForCollectionResizer was called with null parent!");
            Debug.Assert(type != null, " CreateForCollectionResizer was called with null type!");
                        #endif

            CollectionResizerData memberData;
            if (!resizerPool.TryGet(out memberData))
            {
                memberData = new CollectionResizerData();
            }
            var created = Create(hierarchy, memberData);
            created.SetupCollectionResizer(parent, type, getSizeDelegate, setSizeDelegate);
            return(created);
        }
예제 #9
0
 void Start()
 {
     determineWidth();
     startPoint = 0 - (GetSize.getX() / 2);
     InvokeRepeating("spawnFood", 2.0f, 1.0f);
 }